'Escape a path, make sure it begins with a slash and contains no invalid characters. Retain literal wildcard characters.'

def escape(self, p):

    if (not (p[0] == '/')):
        p = ('/%s' % p)
    return urllib.parse.quote(p, safe='/*')
