Updated to work with node-imap v0.8.0

Updated to make current functionality work with node-imap v0.8.0.

Fixes #24
Fixes #25