Replaced commands.getoutput and subprocess.Popen with utils.* replacements

Looking to be forward-compatible, commands module is not in Python 3 and it's good to have things a bit unified. Also allows for one central place to print debug messages of what is going on.