Add a handler for uncaught script errors and log them as grunt errors.
Add a logErrors option to control whether script errors are logged to grunt.

The option currently defaults to false.
Do not redefine var
Merge pull request #106 from kmiyashiro/log-script-errors

Log script errors