Update Gruntfile.js to have a validation function for each task

This has the fix for the validation. So each task validates --target switch if specified