Add test for db.rb
Fix db_dir path