class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
more info about the class
The class should run on IIS, although I haven't tested it. Can you copy here the results of $foo->log?
Maybe it is a problem of path separator. Which version of the class do you use?