BUG: use the dirname for the test db.