Fix a bug with error reporting.

Use the correct executable name when reporting a failed command (this is
another closure variable fix).
Capture stderr, report it on failed commands.