Handle XML attachments properly

fix from https://github.com/sophistry/peeker/issues/5