Solved some portability issues related to the qsub command.