First of all, thanks for all your replies.
Here is the problem that we were having with the script not FTPing:
Firewall is blocking the passive mode ftp transfer.
We can request a change for the firewall config to be fixed so that FTP works transparently.
In the mean time, I added a "passive" command in the ftp blurp in the script. This command is a toggle switch command, and when it is run for the first time, it turns off the passive mode (i.e. all ftp transfers take place in active mode). With FTP mode active, script is working fine.
Once again thanks.