fix for not expanded TMP_DIRECTORY variable

Environment variable TMP_DIRECTORY is not visible for subsequent call to bash.
Fixed.