Fix up and make readable the copying-of-files routine

I thought we had discussed this...?