Rename test.js to main.js, add a test.js containing unit testing runtime. Add assertion tests in main.js: does not work at the moment. Fix bug in buffer. Add require.main according to specs.