Apply the same techniques from "cp" to make copying files much faster.
This could later be replaced with library-provided utility functions when/if they exist.