Fixed various -Werror=format and -Werror=format-security compilation issues.


There were many different compilation errors when compiling on Ubuntu 13.10.