fix readInt() for negative values

use strrev() then unpack('l') instead of unpack('N'), which is for unsigned int