Added len parameter to intToByteArray function so you can specify the
length of the output. The output will be padded to this length with 0s.