[piper] fix for partial lines when reading stdin