Using q to async wait for all files to be processed

Also, the contents of the shell script have been replaced with `npm test`.
I did an `npm install --save` when installing `q`; it must have reformatted this section.