Adds a test for #41's bug.
Fixes #41.
Merge pull request #50 from BrunoDeBarros/master

Fixes an issue with newlines being counted twice.