add workdir support for those who don't want to use system temporary folder