Test and fix normalize_path_copy()