Fix bug where file unicode flag wasn't being used.