Change file pickling to avoid \x00 chars