Check exports

Closing #562 again, and also checks that when a class is exported so are all its members, as suggested by @jdegoes.