def splitext2(filepath):
    """Split filepath into root, filename, ext

    Args:
        filepath (str, path): file path

    Returns:
        str
    """
    root, filename = os.path.split(safepath(filepath))
    filename, ext = os.path.splitext(safepath(filename))
    return root, filename, ext