git.el: More robust handling of subprocess errors when returning strings.