Extract run_command and run_specinfra to Backend class.