Create a directory structure using the hashed filename
    :return: string of the path to save to not including filename/ext

def create_hashed_path(base_path, name, depth=2):
    """
    Create a directory structure using the hashed filename
    :return: string of the path to save to not including filename/ext
    """
    if depth > 16:
        logger.warning("depth cannot be greater then 16, setting to 16")
        depth = 16

    name_hash = hashlib.md5(str(name).encode('utf-8')).hexdigest()
    if base_path.endswith(os.path.sep):
        save_path = base_path
    else:
        save_path = base_path + os.path.sep
    for i in range(1, depth + 1):
        end = i * 2
        start = end - 2
        save_path += name_hash[start:end] + os.path.sep

    return {'path': save_path,
            'hash': name_hash,
            }