Python Pathlib Get Directory In R