Bugfix with parsing command messages

Added a test case, and also fixed a logging message's format that was
breaking the test suite
Merge pull request #1 from kkroo/patch-1

Bugfix with parsing command messages