Python: Replace os path operations with pathlib.Path


- Updated functions to use pathlib.Path for path manipulations and
directory changes

Change-Id: I5962a4173f2da5d4acd22f62171d837b4dcef0d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
commitd2b4d0f4365dfe53b2eeb9171111ce97c3a7e716
parent527691e644ba81bfe74bccd3606b85ddb877f94e
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>
committerShyamnath Premnadh <Shyamnath.Premnadh@qt.io>
commit timeTue, 26 Aug 2025 15:44:53 +0200