Make sure git returns status 0 when testing it's existence.
Fix unit tests for all environments.
Use current process environment to execute commands.
Use newline when removing origin from git config.