Allow the line ending characters to be overridden
Added a test for custom line endings
Updated the writing example to include a line ending setter