Blow up early on a bad header

Fixes #43