Switch to python3.
Use pathlib instead of os/os.path where possible.