Fix has_path when cwd isn't root