def normalize_url_path(p):
    """Makes sure a URL path starts and ends with a forward slash"""
    if not p.startswith("/"):
        p = "/" + p
    if not p.endswith("/"):
        p = p + "/"
    return p