Make stdin and stderr use unbuffered I/O

This makes sure they're in sync otherwise stdin is buffered while stderr
isn't and the puts and git's stderr output aren't in sync.