ramdisk: improve symlink redundancy prevention