Fix attachment filename and title scrubbing

Fixes https://www.pivotaltracker.com/story/show/59031842