@Richard - it certainly isn't a Ghostscript problem (Ghostscript is not used until you come to view/annotate the pages in the browser - it creates the images of each of the pages).
Unfortunately, I don't know what the problem actually is.
Could you take a look on your server in the c:\dev2moodle_data\temp\uploadpdf\sub folder and make sure that:
a) it exists (a good starting point!)
b) IIS has permission to write to that folder
After that, I don't know what else to suggest - looking at the code it certainly checks for the existence of the correct folder, then creates it, if it doesn't exist.
Aside from that, my only other suggestion would be that Moodle (and most other PHP applications) generally seem to be much happier running on Apache, not IIS (and preferably on a Linux system, not Windows). But I could be wrong about that, as my web hosting experience has only been with Linux / Apache.