Fix tests to properly handle windows \r\n line endings

When trying to run the test suite on a Windows box, I found that several of them failed. It turned out the issue was that onwindows, the sample xml file is loaded with `\r\n` line endings. The assertions are explicitly checking for `\n` line endings and failing.

This change normalizes the line endings to `\n` before passing to the actual test function, thus fixing the issue. I've tried this on both Windows and on a Mac; tests now pass in both environments.