Fixed GIT_DIR variable and a Python exception.