Windows porting: fixed bug related to path separators and various other things.

Fixed uploads through uploader - including a test that demonstrates it.
Fixed jshint warnings.