fix memsort to allow copying files > 2GB