Potential fix for #133, by redirecting pipe to stdout after port read

I've confirmed that this prevents the deadlock in the sample code I posted in #133. However, this does seem to be a hack - it would be nice to a way of doing this that didn't need another subprocess...