Logfile creation is more robust

Parent folder is created if missing. If creation fails, stderr
Database creation is more robust

Added the sqlite lib to classpath, because it was needed.
FileInfoDatabase.openOrCreateDatabase is called before the database is
used. Fixed querying the version of the database.