Fix GetTempPath32 if count=0.

diff --git a/files/directory.c b/files/directory.c
index dbaad90..8255579 100644
--- a/files/directory.c
+++ b/files/directory.c
@@ -138,7 +138,7 @@
         if (!(ret = GetEnvironmentVariable32A( "TEMP", path, count )))
             if (!(ret = GetCurrentDirectory32A( count, path )))
                 return 0;
-    if ((ret < count - 1) && (path[ret-1] != '\\'))
+    if (count && (ret < count - 1) && (path[ret-1] != '\\'))
     {
         path[ret++] = '\\';
         path[ret]   = '\0';
@@ -159,7 +159,7 @@
         if (!(ret = GetEnvironmentVariable32W( temp, path, count )))
             if (!(ret = GetCurrentDirectory32W( count, path )))
                 return 0;
-    if ((ret < count - 1) && (path[ret-1] != '\\'))
+    if (count && (ret < count - 1) && (path[ret-1] != '\\'))
     {
         path[ret++] = '\\';
         path[ret]   = '\0';