Switch from os.popen() to subprocess.check_output() for running git rev-parse