used __dirname to control the location of the database so that test works on Travis