Grunt 0.4 compatibility

Grunt 0.4 is about to be released soon. I changed a few lines to make it work with the new version as per the [upgrade guide](https://github.com/gruntjs/grunt/wiki/Upgrading-from-0.3-to-0.4).