added tmp-dir option