Update to use GIT_DIR env variable

`Popen` on Centos 6.5 does not seem to use the current working directory the same way that OS X does.  Simply changing directories with `os.chdir` is not enough for the various `git` commands to work properly.

This PR switches to using `GIT_DIR` as an environment variable to ensure the proper git directory is used and the commands succeed.