Debug workflow

+ fixup pimpathon withTempDir to make tests work on mac.
Are this "sleep" and the one at the end necessary? Things seem to work without them.