Blow up early on a bad header

Fixes #43
Merge pull request #44 from pforhan/invalid-length-in-header

Blow up early on a bad header