detect corrupt configuration files and abort setup

This detection is not foolproof, but should greatly help if a
configuration file is hosed.