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

Main change is to tasks/curl.js, so if json:true is passed in options it prints JSON as the output file. The rest is adding in a test for a random JSON file, and updating the grunt.js files to the new Gruntfile.js format.