Changed the lines() method to support Windows and OS 9 style line endings

This patch changes the behavior of the `lines()` method to correctly handle Windows and Mac OS 9 style line endings.

I do this by changing the search passed to the `split()` function from `"\n"` to `/\r\n?|\n/`.

This pull request is related to the request in issue #189.