Complete memstream-based conversion of fceu/file.c