Improve Error Diagnostics

Previously, if an error happened during the Git commands, there was no
way to get the contents of the failure.  This change adds
functionality to automatically output the content of stdout and stderr
in the case of a non-zero return code.