Added check for JSON output and added test. Updated to Gruntfile.js