Fix bug for jobnames longer than 10 characters

Logic checking number of running jobs would fail if jobname was too long
because `qstat` output truncates the job name. Now use first 9 characters
when checking