Replaced entityMap Dict with list of tuples

Dicts are unordered, so using a Dict did not guarantee that "&"s would be replaced before other characters. 

e.g. a "<" would be replaced with "&lt;" and then escaped again to "&amp;lt;". Using a list ensures "&"s are escaped first.