I re-implemeted normalizeLineEndings without using the slow replaceAll method (supports regular expressions).
The new implementation also cares for single \r characters, but without additional cost. As you can see in the related bug it "somehow" happened that a single \r made it into the commit message. So I'd like to keep removing single \r characters.