Make Git::cleanEnv static
Extract functionality from GitDownloader to make it more reusable