Support class directives in dictionary table export.

I've finally (with the help of [Stack Exchange](http://programmers.stackexchange.com/q/267495/161632)) managed to create a way to regenerate class directives when exporting dictionary tables. It essentially generates a tree of class directives based on the method described in the Stack Exchange question I linked before, and then populates them with the dictionary entries. It's a whole bunch of recursion and Rohan would probably cry but it works (as far as I can tell)!