As I use Github, I should use .gitignore and not .hgignore. re #127
Factorize a little more the DB handling. re #127
Ensure the check can be tested. re #127