deanishe,
you are right. It's an AppleScript thing.
I compared the scpt-files produced with Scripteditor and with osacompile. Same length and they are nearly identical, they differ only in the event code used for property path of document:
Scripteditor generates ppth, which is correct and osacompile generated FTPc, which is property path of class URL, I found a list of event codes in gist.
You objected to my use of "Run NSAppleScript". OK, I merged the two AS now into a single "Run Script", this simplifies the whole workflow and makes it more efficient.
Thanks for your comments
-Hans-Peter