Test and fix tuple code.

src/tuple.cc currently contains code actually invoking the interface.