Make System/tmp_dir/0 care about Windows and add more dirs.

The documentation for this function said it looked for a temporary
directory on Windows as well as unix, but as you can see from the
original code it didn't do anything on Windows and only looked at one
directory on unix.

This function appeared to be trying to copy the Python version of this
function, but wasn't going to the same lengths to find a temporary
directory as it does. This commit makes it pay attention to Windows and
adds more directories to look for on other operating systems. It is more
or less the same as the Python version at this point.

http://docs.python.org/2/library/tempfile.html#tempfile.tempdir