Error checking to avoid 'invalid byte sequence'.
Merge pull request #16 from trogdoro/master

Error checking to avoid 'invalid byte sequence' per #15.