Did you copy'n'paste the sample script to a new file?

I've just tried it to ensure that there were no problems introduced as I uploaded it, and it works fine.

You may need to paste it into Word first to preserve the end of line characters, then copy and paste into notepad or whatever editor you are using for editing the script.