Fixed unsafe formatting in logging calls.

Without this, GCC 4.2.1 on OS X 10.7.5 complains with "warning: format not a string literal and no format arguments".
Merge pull request #310 from johnhaddon/unsafeFormatting

Fixed unsafe formatting in logging calls.