Properly close all handlers

* FlushFileBuffers before disconnect
* close all handlers in PipeListener Close()
uncomment this?  I don't think it actually matters, when the test application ends, the handles will close anyway, but it's good for correctness.