Allow attributes to be set on class methods.

This fixes an issue discovered in the process on discussing #106.

@astrofrog.