RunContext#inTempDir() now accept a callback

fix #722