Fall back to git rev-parse --short HEAD if symbolic-ref doesn't work.

This fixes the issue were it wouldn't output a branch name if you were
not on a branch.

Closes #15