Add tests, fix bugs found along the way. We don't need an explicit abort
load command because abort requires that the calling transaction abort
as well. It's more clear to just rollback the transaction and have that
implicitly abort the load.