Fixed implementation so that it works with the latest SQLite binaries (wrong version number). Added config so that the database is opened in serialized mode.