fix for not expanded TMP_DIRECTORY variable