Converted the minitest tests to mocha tests and added mocha 1.9.x

I saw that a few of them were incomplete. Maybe as a followup I can improve the tests.

I hope you don't mind that I'm doing these as a pull request to begin with, so I can get your input on this stuff.

Also renamed GLOBAL => global, -- i didn't even know it was used to be called GLOBAL..

Separately I wonder if there should be beforeEach/afterEach callbacks to just create actual directories (maybe a bunch in ./test/tmp and remove them when the test is finished in an afterEach) .. though I guess you'd need a test for the test in that case :)