We have deprecated IronPython so we should be able to use `pathlib` instead of working with `os.path`. Updating this will improve readability and follow the push from the Python ecosystem. This should be a good entry point for new contributors.