Fix for Bug 901404

* syntax error in bash code
* Added /tmp to directory for mktemp
Merge pull request #1186 from jwhonce/dev/bz901404

Merged by openshift-bot