Removed windows line endings (^M).

These line endings cause git diff noise when they get removed, which
can happen by mistake when saving from an editor like Sublime.
This patch gets rid of them explicitly.
Merged @zerthraeus' master branch, refactored to retain early-return style. Passes existing tests,
Bumped npm version. Incorporates commits that fix #8
Merge pull request #10 from zethraeus/line_endings

Removed windows line endings (^M).