Rewrote the determine_version code to be more robust and still work if at least one database file is given.
Cleaned up some extra code left in from testing.
Added some try clauses around opening DBs