Fix bug in do-copy implementation for File.