Fixed unicode parsing bug and added test for boundary checks.
Merge pull request #5 from ebfull/fix-unicode

Add character boundary check