Temp directories are usually chmod'd to 777, are they not?
On my Windows server, here's the results:
echo tempnam(NULL, 'abc'); // \abcE9.tmp (in the root of my C:\)
echo tempnam('bradg', 'abc'); // C:\WINDOWS\TEMP\abcE9.tmp
On my Unix server...
echo tempnam(NULL, 'abc'); // /tmp/abc7jSD7o
echo tempnam('bradg3', 'abc'); // /tmp/abcAPLcG1