Bugfix: Serialized numbers are signed, so need an extra \x00 in the case of 0x80...-0xff...

Function body taken from Eloipool's bitcoin/script.py encodeUNum function (does not work for zero or negative numbers)

Bug found by gigavps