Add tests

Given the growing complexity of the project, I thought that some tests were becoming essential.
I added tests using mocha and expect.js. These should cover at least the most sensitive parts of the compiler code.