Bug 1193: Use format string correctly and fix corresponding unit test
as well

Change-Id: Ib05078ee9045f60cff663407aa401045ac9d885b
Signed-off-by: Rob Adams <readams@readams.net>