Fixed some small issues with changed libgit2, also improved git-target wrapper