Use git_pathdup instead of xstrdup(git_path(...))