A few more fixes for Windows - MinGW

Windows still does not work correctly, there are a few issues...

mkdirp does not create the deps/ directory on Windows, it dies silently at the part where it creates the directory. The `pathname` that get's passed in is wrong.

`mkdir` should be `_mkdir` on Windows, `mkdir` is deprecated according to http://msdn.microsoft.com/en-us/library/ms235326.aspx

These are small changes mostly related too MinGW, I didn't want to do a lot of changes because I know you don't want deps/ in PR's so I told you of them above.