This improves support for corrupt configuration files. It first will attempt to use default settings and recreate the configuration file. If this fails, it will behave as it did before.
This contains the patch file and the modified source file.
I think jklingen already had a look at the patch, as the code is already changed.