Use fputs to write strings to files.

Fixes:
error: format not a string literal and no format arguments
[-Werror=format-security]

on Gcc 4.7.2