added COPYING file
added spec file
enable logging to stderr until logging is setup properly

Until now exceptions raised before the logging was setup were silently
ignored.
use enumeration constant identifiers instead of numbers

Utilise new feature of shell to make the code more readable.
fixed command declaration checking

Some exceptions were raised with wrong arguments.

Ditched magical creation of CALLABLE property, when missing in class
dictionary.