Make more information available if git fails

Often the reason a git command failed is output to stdout, but stdout was lost in the old error processing code. The new code preserves stderr and stdout and does not assume that the cause of the error was written to stderr.

For example, if a commit fails due to "nothing to commit, working directory clean", that message is written to stdout, but would not be available as the cause of the resultant rejected promise.