Get the GPG keyring directory for a particular application.
    Return the path.

def get_gpg_home( appname, config_dir=None ):
    """
    Get the GPG keyring directory for a particular application.
    Return the path.
    """
    assert is_valid_appname(appname)
    config_dir = get_config_dir( config_dir )
    path = os.path.join( config_dir, "gpgkeys", appname )
    return path