git_pathdup: returns xstrdup-ed copy of the formatted path