copying files is not done generically

As FS#67411 shows, many of the copy actions are not generic enough to ensure robustness towards trivial file renaming in packages in use.