Unbreak readblob() from stdin, socket, etc.
Add readline() method for streams, implemented for files using fgets().