Add script to lock SQLite db for tests.
Add SQLite retry to command db.