commands: commit to DB before invoking a command with self.command()
pylib: nicer debug output from DB
pylib: fix bug with create of new categories