Fix error bytes for exception message
Remove tags for passing specs
Add specs for matching regexp with invalid encoding
Check string encoding validity before trying to match

Regular expression matching only should happen on validly encoded
strings, so check this state and raise exception if appropriate.

Fixes #1989
Remove tags for now passing specs