fix a whole heap of bugs in runner scripts

There are a collection bugs that have been fixed:
- extraneous newlines in keyfiles don't cause weird shit to happen
- the "timestamp: command not found" bug is fixed
- on a related note, logdirs are now variables, so that timestamping
  actually works
- linking a qcstep dir to qcd now actually works
- ensure log and de dirs exist by mkdir -p'ing them, not just mkdiring
  them
remove extraneous debug line