Make ``cd`` take to git repo root rather then $HOME.

If in a git repo ``cd`` will change to repo root. Otherwise normal
behavior (change dir to $HOME).