Fix double error output from shell commands.