Fix support for Unicode surrogate pairs, add tests

This should take care of property handling encoded Unicode surrogate pairs and fix #21. Can you look it over when you have a sec, @gonzofy?