Calculate the on-disk path to storing a zonefile's information, given the zone file hash.
    If the zonefile hash is abcdef1234567890, then the path will be $zonefile_dir/ab/cd/abcdef1234567890.txt

    Returns the path.

def atlas_zonefile_path( zonefile_dir, zonefile_hash ):
    """
    Calculate the on-disk path to storing a zonefile's information, given the zone file hash.
    If the zonefile hash is abcdef1234567890, then the path will be $zonefile_dir/ab/cd/abcdef1234567890.txt

    Returns the path.
    """
    # split into directories, but not too many
    zonefile_dir_parts = []
    interval = 2
    for i in xrange(0, min(len(zonefile_hash), 4), interval):
        zonefile_dir_parts.append( zonefile_hash[i:i+interval] )

    zonefile_path = os.path.join(zonefile_dir, '/'.join(zonefile_dir_parts), '{}.txt'.format(zonefile_hash))
    return zonefile_path