Uses fread() and fwrite().