tests for GH#169

tests for GH#169: Exceptions due to bug BufferedBidirectionalStreamBuf.h