Bug Fix

The line:
length = ord(offset[0]) + (ord(offset[1]) << 8) + (ord(offset[2]) << 16)
+ (ord(offset[3]) << 24)

Will throw a type error. I've changed this back to use the original
call. When I have some time I'll investigate the performance
gains cited in the original fix.