Do not cache error pages

Since we're loosing the HTTP status when caching error pages. Also, errors shouldn't be cached. Solves issue #20
Moved if-statements into a single one
Fixed tab type
Added tests for new events
Merge pull request #22 from codepeak/develop

Do not cache error pages