Normalizes header and footer linefeeds

The header and footer linefeeds were being converted to \r\n on
Windows, causing tests to fail. This replaces them with \n. Fixes #177.