function promisify(obj, method) {
        var result = new $.Deferred(),
            args = Array.prototype.slice.call(arguments, 2);
        args.push(function (err) {
            if (err) {
                result.reject(err);
            } else {
                result.resolve.apply(result, Array.prototype.slice.call(arguments, 1));
            }
        });
        obj[method].apply(obj, args);
        return result.promise();
    }
Utility for converting a method that takes (error, callback) to one that returns a promise;
useful for using FileSystem methods (or other Node-style API methods) in a promise-oriented
workflow. For example, instead of

     var deferred = new $.Deferred();
     file.read(function (err, contents) {
         if (err) {
             deferred.reject(err);
         } else {
             // ...process the contents...
             deferred.resolve();
         }
     }
     return deferred.promise();

you can just do

     return Async.promisify(file, "read").then(function (contents) {
         // ...process the contents...
     });

The object/method are passed as an object/string pair so that we can
properly call the method without the caller having to deal with "bind" all the time.

@param {Object} obj The object to call the method on.
@param {string} method The name of the method. The method should expect the errback
     as its last parameter.
@param {...Object} varargs The arguments you would have normally passed to the method
     (excluding the errback itself).
@return {$.Promise} A promise that is resolved with the arguments that were passed to the
     errback (not including the err argument) if err is null, or rejected with the err if
     non-null.