Fix line ending conversion write routines.