Fixed jslint error and added failcode to phantomjs to force builds to exit with an error code if phantomjs fails with an error code.