def timid_relpath(arg):
    """convert an argument to a relative path, carefully"""
    from os.path import isabs, relpath, sep
    if isabs(arg):
        result = relpath(arg)
        if result.count(sep) + 1 < arg.count(sep):
            return result
    return arg
