Ruby 779 encoding

Some utf-8 strings didn't throw an exception when #unpack("U*") was called but the encoding still wasn't valid. This PR checks to make sure the encoding is valid and throws and exception if not.