Fix path to database

This does path computations, since otherwise it is sensitive to the
current working directory when one launches the app.