Python Pathlib Write Text File