(1) Your problem is related to the fact that when a filename contains a slash, Mail doesn't return its Hfs name but it's Posix one.
Your attached file is named "MM Testing 12/20/16.pdf” but the name returned by Mail is "MM Testing 12:20:16.pdf”.
As the rest of your script use Hfs path it logically fails.
use AppleScript version "2.4"
use framework "Foundation"
use scripting additions
#…
set originalPOSIXName to "MM Testing 12:20:16.pdf" # Maybe this POSIX version would be useful somewhere
copy originalPOSIXName to originalName
if originalName contains ":" then set originalName to my replace:originalName existingString:":" newString:"/"
--> "MM Testing 12/20/16.pdf"
#…
on replace:sourceString existingString:d1 newString:d2
set sourceString to current application's NSString's stringWithString:sourceString
return (sourceString's stringByReplacingOccurrencesOfString:d1 withString:d2) as text
end replace:existingString:newString:
CAUTION: the replace handler used here is not the one used in one of my mauls of december 28th.
Yvan KOENIG running Sierra 10.12.2 in French (VALLAURIS, France) mardi 3 janvier 2017 11:41:14