fixed cd $TMPDIR issue