def fix_extension(ext):
    """
    Ensures that the extension starts with a dot.

    :param ext: the extension to (potentially) fix
    :type ext: str
    :return: the (potentially) fixed extension
    :rtype: str
    """
    if not ext.startswith("."):
        return "." + ext
    else:
        return ext