Fix error with $TEMP_DIR variable