Make it work with just stdin, no thought involved
The test files show that it now round trips. Takes about a third of a second.