Fix #134853 Since the Windows path separator is typically `\\`, Here, we use `pathlib` to ensure that the separator is in Unix format. Additionally, since the file itself specifies the use of python3 (pathlib requires python3), some python2 code has been removed.