Fix CBOR ToString method, and add tests