runtests: Pick right default path for database
runtests: assorted bug fixes from manual testing
runtests: fix db issues on single machine runs