Wait for write to finish, not read

When copying files, wait until the write is finished before proceeding.  For network filesystems with a delay (e.g., NFS), waiting for the read to finish can cause an empty file to be created.