Add try/except for os_dep.command failure

The function os_dep.command() should be surrounded by try/except.
Merge pull request #356 from PandaWei/virt-cmd

Add try/except for os_dep.command failure