Fix -Werror=format-security errors

Fixup a couple of errors when compilng with -Werror=format-security.
Merge pull request #300 from javacruft/wip-format-security

Fix -Werror=format-security errors