HPUX is a bit unique and the mktemp utility is different. You can probably work around the issue by replacing the following:
Instead of `mktemp -d /tmp` for TEMP_FILE use `mktemp /tmp/tmp.XXXXXXXXX`
For REMOTE_DIR_LIST and LOCAL_DIR_LIST simply use `mktemp` to have the utility create a directory in /tmp. Though I don't really understand the purpose of these.
Also note that Linux uses bash and not ksh as the default shell. If your scripts rely on ksh'88 you might run into compatibility issues because this version is not public domain. You have ksh'93 on Linux, but pdksh, which provides more backward compatibility with ksh'88 is no longer available since RHEL and OL 6.