Put tests in 'test' rather than 'tests' so tha mocha finds them by default
jshint index.js too, and fixed issues found