updates shell script for better symlink support