Avoid running git in non .git roots.

Otherwise hilarity can ensue.