Check for git before querying it for a version

* pbr/packaging.py(_get_version_from_git): Wrap calls to
_run_git_command in a conditional check for _git_is_installed to
avoid an opaque error message which can occur when you have a .git
directory but no git executable.

Change-Id: I6752c93d393a941daa1e7fb949c7c3d2a75337f3
Closes-Bug: #1326682
Allow examining parsing exceptions.

Having to put breakpoints in pbr to diagnose issues is bad for dealing
with reports from users.

Change-Id: Ifecf4c4e4bb5955e0e5feb4bf5b5b85150b08ebe
Merge "Check for git before querying it for a version"