A bit of refactoring so we can load old index files if they exist (if a new kdb index is not present).