Bug fixes for gitfetch and libfetch