Try to close touchsource programs better, by sending a newline, for ones
that wait on input, and also wait for some output after too. This allows
us to show warnings better too.