Sqlite3 attempt to write a readonly database