Add unit tests

This is a first go at adding unit tests on this module. Would fix issue #2

I took out the parser part so we can test that without actually running in the specific environment.

There is another bug for creating functional tests, that would in fact *run* the module (not only the parser) and see how it reacts.

Missing: windows sample data and parser.

r? @tofumatt
Space after `if` makes them more readable, but more importantly is consistent with the rest of the code.

I'll add an issue for adding linter/style-check to the tests (for PRs).