def _add_slash(path: str) -> str:
    """
    Add a slash to the beginning of a path if it doesn't already have one and convert ./ to /.

    Parameters
    ----------
    path : str
        The path to add a slash to.

    Returns
    -------
    str
        The path with a slash added to the beginning.

    >>> _add_slash('/home/user/')
    '/home/user/'
    >>> _add_slash('home/user')
    '/home/user'
    >>> _add_slash('.')
    '/'
    >>> _add_slash('/')
    '/'
    >>> _add_slash('test')
    '/test'
    >>> _add_slash('./test')
    '/test'
    """
    if path == ".":
        return "/"
    if path.startswith("./"):
        return path[1:]
    if not path.startswith("/"):
        return "/" + path
    return path