Unescape xml entities and allow custom directory to read from

Not sure if you like all the minor changes ...