Copying files via stdio