The GUI prompts you for the first few particulars of the script, and therefore those same attributes need to be removed before import of the script, otherwise a duplicate attribute is received; this is the information input via the GUI that is included in the export for compete exported script information.

Believe all of this text should be removed, and then the script will import, copy/paste, correctly:

###########################################################################
## Export of Script: IOS Image Upgrade 2960 and 3560
## Script-Level: 3
## Script-Category: Uncategorized
###########################################################################
Script:
IOS Image Upgrade 2960 and 3560
Script-Description:
This script may be used to help automate image updates for Cisco 2950, 2960, and 3560 series routers and terminal servers. It is designed to work with Cisco IOS based devices that use "flash:" as their boot storage device - with a single partition and have only one supervisor module. No attempt is made to handle multiple flash devices, partitions within flash devices, or loading images to multiple supervisor modules.

Extraneous "n" in the copy command?

The script sends this for the copy command. Note that the second newline is followed by a "n" character. I don't know what the author was anticipating, but your session output shows that's what the CLI complains about.
copy http://$server/$new_image_name flash:$new_image_name\r\rn\r

Marty,

A prompt is expected after the copy command is invoked, one that we want to say 'no' to and simply sending 'n' is sufficient.

Bruno,

Since this does not seem to be needed in your environment, please modify the script to remove that "\rn\" from the end line; I would just remove it from the FTP copy command, as the other methods may still cause the prompt to occur.