Raise an exception for invalid UTF-8

Same issue as the one logged in this ticket: https://jira.mongodb.org/browse/RUBY-779