Print command and stdout/err on error

The stdout and stderr (which are merged) are now read
from the created Process instance if the return code
is not 0.
Merge pull request #2656 from joshmoore/rebased/develop/in-place-fixes

In place fixes (rebased onto develop)