Add configuration namedtuples and read/write tests

Add expect script which automates the user interface showing an example run.
Moved the example XML configs to the test directory where they are being used
as test data.

Fix not all python distributions will import the readline module.
The tab autocomplete code is wrapped in a try block.