Unbreak attachmentOptions

The existing check fails if attachmentOptions isn't set because it looks at options.attachmentOptions, which may be (and in my case is) undefined, not this.attachmentOptions, which is what gets defaulted with {} by the assignment in line 24. This simple change unbreaks things.