Sqlite3

Checking if tests pass on Travis, as upgrading SQLite on OS X to 3.8 is a bit of trouble.

Includes #296. Trying to fix #302.