collect attributes from self.__class__ instead of self

This prevents properties from being evaluated when collecting commands.
Merge pull request #220 from hamr/master

collect attributes from self.__class__ instead of self