Unplug stdin in subprocess to avoid test hangs

Thanks to @kislyuk