Handle symlinks when preparing and copying files