kernel/kernel.py: Unicode fix when logging action to database