Test vector saving implementation can go near loading implementation. Also we
can separate out some simple types from the more complex logic. Initially
this was to resolve a circular dependency but that ended up being resolved
mostly by treatming SEGMENT_SIZE more like a parameter than a global. Still,
smaller modules are okay...