Auto create db directory if it does not exist.