config: Enhance config support

We can now also generate a complete new config file, instead of only
replacing an old one.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>