Fixed ~ expansion

It's another "string mapping to a method" thing, but rather than add it
to the constructor of GeneratedClassContext, like the other gazillion
properties have been, you have to set the property manually. Genius stuff.

Lot of stuff to put back, and want to review how we do master pages, but
seems to be working ok.