Add JUnit test and fix Shell.java with db.file=<null>