Reworked tmp directory creation/location a bit
Determine number of cores available locally or on a slurm node