Replace check_output() by Popen() for python 2.6

subprocess.check_output() was introduced in Python 2.7.
Normal CentOS/RHEL 6.x doesn't have Python 2.7, however.