mode/applescript : set the `$id` to the correct value

This brings the new applescript mode into alignment with the other modes
per #1778
Merge pull request #2013 from rmsmith/master

mode/applescript : set the `$id` to the correct value