Move db initialization code into initdb.py.
Added logic to find all changed files, and all tests that rely on them.