Better errors in ajax mode

Hey charliesome,although my fork I am yet to add test cases.
Maybe you could accept this pull request and add it to a new branch test it and let me know.

Basally I have added a helper method,which loads javascripts and css that future injects an iframe with src as "__better_errors" whenever an error related in ajax request happens.