Make sure the tests do not fail if messages contain a trailing blank line. This fixes test failures on Ubuntu 14.04.