improve logic for header-stripping in MIME.java