Add an encoding option for file reading & writing.