Modified remote_symlink() to enable symlinks to directories.