Detect non-existant DBs when working out DB version. Start thinking about how to make automated testing work (currently it fails with a DB error because we connect when importing various modules)