Better information about failed sub-processes

This PR should make it easier to understand what went wrong with the Docker CLI when it's running under Centurion by printing out the command that was run as well as the error. Also reduces code duplication.