Fixed regression in testcase
Improved atom checks and error messages

Length values less than 8 are wrong, since an atom must be at least 8
bytes. When an atom is wrong, the error message should state what is
wrong with it.