Fix for PBSPro, incorrect formatting of cores, missing array_cmd.

Also fix for not setting the resources line properly.