Fix issue with immediate value encoding

makeImm in Encoder.hs was incorrect, and for values outside of the range 0-255 was producing incorrect results that could not be decoded properly