Fix `git_path_walk_up` to work with non-rooted paths

The bug has been here forever but it's only visible when working with attributes in a bare repository, when the attribute paths are in fact relative.

cc @arrbee