Test suit for Util

Added test cases for the encoding/decoding functions of binary.Util.
ByteArrayOutput put() method now throws java.lang.IllegalStateException.