When throwing errors, check if its cli, if not then render HTML error
Merge pull request #3 from Scottymeuk/master

Don't output HTML in CLI errors