Fixed build bugs on Windows.

* Fixed output dir not being created on build complete.
* Fixed '/' being added to the front of Windows absolute paths.