Fix runGit throwing an exception when git is not installed

Also for when it returns a non-zero exit code.