gsubprocess: fix communicate() with empty buffers