Deepseq stderr before closing the handle 

Otherwise laziness allows for the handle to be closed withouth receiving the
input. This caused that no error messages were printed when `unixFilter`s
failed.

The second commit sets the handle's locale as it's done for stdin and stdout. Is it actually needed?