added assert to check that the return value from extract packet is valid

if extractPacket returns a value bigger than the buffer size, this will
cause a core dump later on.
changed assert to exception
fixed spacing in error message
Merge pull request #4 from jakobs/add_assert

Throw exception when extractPacket result size is larger than buffer