Merge pull request #13 from yarikos/master

Added leaks checks to test command; fixed leaks in tests
Merge pull request #14 from yarikos/master

updated mocha
Merge pull request #15 from yarikos/master

refactored test - copypaste replaced by function
continue refactoring - moved test fn to helpers.js