function removeTempDirectory() {
        var deferred    = new $.Deferred(),
            baseDir     = getTempDirectory();

        runs(function () {
            _resetPermissionsOnSpecialTempFolders().done(function () {
                deletePath(baseDir, true).then(deferred.resolve, deferred.reject);
            }).fail(function () {
                deferred.reject();
            });

            deferred.fail(function (err) {
                console.log("boo");
            });

            waitsForDone(deferred.promise(), "removeTempDirectory", 2000);
        });
    }
Remove temp folder used for temporary unit tests files