enhance error messages
fix bug calculating IFD1 offsets for 0 entry field

Well, it was probably busted for all cases, but I'm not sure if that's
true. basically, the != 0x00000000 test was broken. So, as long as there
as an IFD1 offset, the code worked fine.