updated error handling in jquery.modal.js

also fixed a grunt issue