Check exports

Closing #562 again, and also checks that when a class is exported so are all its members, as suggested by @jdegoes.
I'm being incredibly dense, but couldn't work out a better way of doing this... suggestions please?