Fix generic-script.sh to check for regular files as well as symlinks.