Put DB writes in a transaction (clownshoes)

I must have been assuming db.serialize() did this for us already.  It seems
it did not!