Use GIT_DIR env variable to specify directory

Using the current working directory does not appear to be as reliable as
explicitly setting GIT_DIR when calling various git commands.  This
instability was noted on Centos 6.5, but was not present on OS X.