Move code to run and monitor a job into run_job().

refs #133