added support for custom error pages

Closes #32 
@twe4ked thanks. I've fixed it now ;)