@aguzhak:

Put a
"cd /tmp"

between

login and "./update"

Cheers
Mike