Fixed wrong generation of scripts for symlinks