Modified to use the packaged version of SQLite if the installed version doesn't work.