Fixes typo
Adds documentation to compat.py file
Introduces a BufferedReader generator

This factors the 'while x.read(N)' loops, and adds a fix for when the
file object is a terminal (we want to stop at the first EOT).
Adds a 'write' command

It does the same thing as 'add', but reads from the standard input.