Don't use deprecated module commands

The commands module was deprecated since version 2.6 and it has been
removed in Python 3. This patch uses processutils.trycmd method to
replace of deprecated module commands.
See http://docs.python.org/2/library/commands#module-commands

Closes-Bug: #1248216

Change-Id: Iee0b3cf59c738bfda9c5b2049a1853abbb6d16e0
Merge "Don't use deprecated module commands"