Using q to async wait for all files to be processed

Also, the contents of the shell script have been replaced with `npm test`.