Check exports

Closing #562 again, and also checks that when a class is exported so are all its members, as suggested by @jdegoes.
Maybe I'm missing something, but what's wrong with this?