Python 2.6.6 support (can't use subprocess.check_output)