Fix for bug#9418. (improved)

Hi,

I re-send PR, because I fixed the bugs founded in following PR.
https://github.com/OTRS/otrs/pull/47#issuecomment-39623460

I have confirmed to pass all of the unit tests for EmailParser.

Regards,
Norihiro