Improve parsing attachment filenames