fixes #6 handling xml entities

Hi guys - I'm not entirely sure about the treatment of &apos; (i.e. whether it should be punctuation or word) - this might be something we want to make configurable.  I think the rest of the xml entities are punctuation though.