WiFi Shield - Update Firmware Problems

Hi, I am new in arduino and I am trying to update the firmware in my Arduino WiFi shield (32UC3A1512-U) but I am facing some problems. I did exactly what the instructions said about the update(MacPorts, dfu-programmer, jumper) but when I am trying to run the installation there were some problems that I cannot find out. I haven't change anything in the script, and I really don't know what is going on. Any help it will be great!!! That's exactly what I get. The problem is in lines 53, 54, 55.

c018123:scripts Stelios$ sudo sh ArduinoWifiShield_upgrade_mac.sh -a /Applications/Arduino.app/Contents/Resources/Java -f shield
Password:
Arduino WiFi Shield upgrade
=========================================
Disclaimer: to access to the USB devices correctly, the dfu-programmer needs to be used as root. Run this script as root.
ArduinoWifiShield_upgrade_mac.sh: line 53: cd: /Applications/Arduino.app/Contents/Resources/Java/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/firmware: No such file or directory
ArduinoWifiShield_upgrade_mac.sh: line 54: ./avr-objcopy: No such file or directory
ArduinoWifiShield_upgrade_mac.sh: line 55: ./avr-objcopy: No such file or directory
Upgrade WiFi Shield firmware
Error opening the file.
Something went wrong with creating the memory image.
Done. Remove the J3 jumper and press the RESET button on the shield.

Another issue is that now the shield doesn't work. At first it can scan for networks but not it doesn't do anything.

Thank you..

I think the error message covers it quite clearly. It cannot find or access the firmware files.

But I cannot find out why there is no access to the firmware files. I did exactly what the instructions said. I am not sure which path should I use(about the first error..) as about the second and the third I use the script as it was without any changes. I don't know what the /avr-objcopy is..and why there is an error in that..

The shell script is unable to change to this directory.

ArduinoWifiShield_upgrade_mac.sh: line 53: cd: /Applications/Arduino.app/Contents/Resources/Java/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/firmware: No such file or directory

It expects avr-objcopy to be in that directory.