lib: fix git calls Vs symbolic links

Some commands (for older git installations) do work properly with
symbolic links in the middle of the paths.