Pathc looks overall good to me. I have a question regarding the test about some potential tempfile leackage that I woudl like clarified.
(small nits: s/current/current/)
small nits: s/anscestors/ancestors/
Do we have to do anything to make sure the temporary directory is deleted at the end of the run ? or are we leaking them ?
This is what tempfile does, whether that's acceptable is arguable.