Add end to end test

Move 'sed' function to a non-Main class, so the EndToEndTest can import
the 'sed' function, because 'Main' in the context of tests, is the test
runner.

(I can't find a way for the tests to be run without the test runner being
main.)