Fixed incorrect EOF handling in MemBio, added error description

Actually, EOF wasn't handled at all and it caused `mem_bio.read_to_end()` to fail. Which in turn failed all `write_pem` implementations.
Merge pull request #67 from vhbit/membio-eof

Fixed incorrect EOF handling in MemBio, added error description