import re


def canonize_path(path):
    """Modify path to a standardized format (e.g. add ./ at the beginning if
    it's a relative path and it's not there)

    :return: canonized path
    """

    # add ./ at the begining if relative url
    if not re.match("^\.?/", path):
        path = "./" + path

    return path