Throw an ImapProtocolException if we get an EOF from the IMAP server

Should fix issue #22