I think you should probably build this off of paths.root so that it always points to the directory above this script, not the cwd.