Support other subprocess commands.

This change is a little bit more intrusive, so will submit a PR.

My code uses the subprocess.check_call function a lot. So this change supports this function, as well as the others.

I use the _wrap function so I don't have to repeat the same code for every function.

This resulted in a run function that did nothing but check return_codes, so I moved that code to run_command.