fix to git versioning: don't blindly use git_get_devstr to determine whether installing from a git directory

I was having issues with astropy always having the wrong version if I pip installed, because my root user directory (`~`) is version controlled with git.  This resulted in incorrect astropy versions nearly always.

This fix is a bit ugly, but it makes sure that you're installing from an `astropy` directory when grabbing the devstr.