Merge pull request #324 from jrogelstad/20212

issue #20212: Pull in some generally useful fixes and refactoring.
mocha tests working
Merge pull request #334 from jrogelstad/20212

issue #20212: Refactoring of tasks and other fixes.
added mocha tests to replace vows tests
Merge pull request #335 from elevow/mocha_1_3_4

Mocha tests to replace Vows tests
Merge pull request #336 from jrogelstad/20212

Swat.