fspath.working_directory() and replace tempdir with temp_dir
use abc.ABCMeta, also extract locate() as a function