Read the remote origin URL from the given git repo, or None if unset.

def read_remote_origin(repo_dir):
    """Read the remote origin URL from the given git repo, or None if unset."""
    conf = ConfigParser()
    conf.read(os.path.join(repo_dir, '.git/config'))
    return conf.get('remote "origin"', 'url')