Replaced commands module with subprocess for Py3, added pexpect requirement.