Use core.longpaths on win32 git - fixes #5525

moved all git related spawning to a utils file, unsure about the details of the gitEnv in add-remote-git.js so I did not move it.
Are all of these exports used?