added the first tests with mocha and refactored a bit of code
tweaked the travis config
updated README
Merge branch 'tests'
bumped version for NPM