Using heredoc for AppleScript template

Avoiding extraneous characters makes the AppleScript easier to read and
modify.