TEMPFILE() is not 100% compatible to the CTIII TEMPFILE() function. xHarbour removes the given directory before it returns. The lines in question are
547 IF (nAt := Rat(cSep, cFileName)) != 0
548 cFileName := Substr(cFileName, nAt + 1)
549 ENDIF
in revision 9304: http://xharbour.svn.sourceforge.net/viewvc/xharbour/trunk/xharbour/source/ct/diskutil.prg?revision=9304&view=markup
Maybe someone could check.