Fixed off by 32 bug on ImageDataDirectory parsing. Added test.