Guard the git commands with an is-repo check
rbenv_update function now guards git repos itself

[ -d .git ] is a bad test, anyhow. Git can be configured to use a
differently-named directory than '.git'. It can even be configured to
place the git-repo outside the working tree at all.
Use pushd/popd instead of 'cd -'

Relying on '-' to be the desired directory is brittle. Elsewhere, a cd
could have occurred such that '-' is no longer the expected directory.
Merge pull request #8 from jasonkarns/git-repo

Guard against non-git repos