Move return code checking and HTTP status code checking into Test._run_program().