(maint) Return the empty string on exec error

Commit 8a14998 removed most of the special casing around executing
commands and changed calling code to always assume that .exec would
return a string. However the error cases in .exec would still return
nil which would break this assumption.

This commit updates .exec to return the empty string on error. It's
somewhat questionable to do this but if we want to fail hard on errors
we should raise an exception instead of returning nil.