Python 2.6 compatibility

`subprocess.check_output` is replaced by `subprocess.Popen`.