Fix crashes discovered on Linux related to configurations

* Do not crash if shipped configurations are not writable
* Do not crash if there is no selected entry
* Select a default entry if there is no selected entry
* Implement tests for new behavior

Change-Id: If4eae33dcda4621d06567a7647dac5066e57d8b4