Throttle spawning of phantomjs processes to avoid freezing the computer while processing large directories

Three commits:
 - sync with domenic's master
 - add throttle to directory processing to stop the script from freezing your machine on large directories
 - fix jshint errors