def _recurseSymlink(path, destdir, fullpath=None):
        """
        Recurse through symlinks in destdir and get the final path and fullpath.
        If initial fullpath (or destdir+path if fullpath not specified)
        does not exist, return path.
        """
        if fullpath is None:
            fullpath = destdir + path
        while os.path.islink(fullpath):
            contents = os.readlink(fullpath)
            if contents.startswith('/'):
                fullpath = os.path.normpath(contents)
            else:
                fullpath = os.path.normpath(
                    os.path.dirname(fullpath)+'/'+contents)
        return fullpath[len(destdir):], fullpath