--- from: http://rosettacode.org/wiki/Update_a_configuration_file note: File handling