vcsh: Fix mktemp bug

2650689d28f662e147d0be4c3ee248f873dbcc3c introduced a bug:
If we are using a template, GNU mktemp will use PWD instead of $TMPDIR
vcsh: Improve error message