'Returns path to use in native file system.'

def _resolve_path(self, path):

    if (not path.startswith('/')):
        raise IllegalPathException(('Path    %s    must    start    with    leading    /.' % path))
    path = path.lstrip('/')
    joined = os.path.join(self.root, path)
    absolute = os.path.abspath(joined)
    normalized = os.path.normpath(absolute)
    prefix = os.path.commonprefix([self.root, normalized])
    if (prefix != self.root):
        raise IllegalPathException(('Path    %s    is    not    valid.' % path))
    return joined
