def _urljoin(*args):
    """
    Joins given arguments into a url. Both trailing and leading slashes are
    stripped before joining.
    """
    return '/'.join(map(lambda x: str(x).strip('/'), args)) + '/'
