def tslash(apath):
    """Add a trailing slash to a path if it needs one.

    Doesn't use os.sep because you end up jiggered on windoze - when you
    want separators for URLs.
    """
    if apath and apath != '.' and not apath.endswith('/'
        ) and not apath.endswith('\\'):
        return apath + '/'
    else:
        return apath
