Fix robust handling of value in put

Add explicit to_s before to_java_bytes for value in put. An integer value
will cause to_java_bytes to fail unless first converted to a string.