Finish refactoring tools into the library and write tests
Created by: onyxfish
Continue in the style of csvstack--put tools "main" code in library and test with simulated command lines.
Created by: onyxfish
Continue in the style of csvstack--put tools "main" code in library and test with simulated command lines.