Make some initial pbspro portability changes to launchcmd script.

Removes -d arg from qsub and instead calls `cd $PBS_O_WORKDIR` before calling
test command.
Factor much of the logic in pbs launchmd to class.

This will eventually be the basis for supporting both moab and pbspro flavors...
Fix ensure_sub instance method.
Fix reference to test_command.

The launchcmd script now works for moab/torque, as it did before...