Move writeline func to cfgfiles
Use Gio for cfgfiles
Use Gio for pluginpref
Escape newlines in pluginpref