Fix potential SQL injection when keying the database

SQLite doesn't support compiled statements with PRAGMA values, and
manually escaping the string seemed chancy. So, I opted to call the
API function directly.