Fixed deterministicness of fetchgit with leaveDotGit

The shebang of .git/hooks depended the git's bash, which made the result
depend of that bash's path.
Merge pull request #3518 from madjar/master

Fixed deterministicness of fetchgit with leaveDotGit