Updated tests and solution for javascript word count

The interface totally changed, and I realized that my previous version
would crash fail if one of the words happened to be "constructor"  ;)