function update(id, packagePath, keepFile) {
        return Package.installUpdate(packagePath, id).done(function () {
            if (!keepFile) {
                FileSystem.getFileForPath(packagePath).unlink();
            }
        });
    }
Updates an installed extension with the given package file.
@param {string} id of the extension
@param {string} packagePath path to the package file
@param {boolean=} keepFile Flag to keep extension package file, default=false
@return {$.Promise} A promise that's resolved when the extension is updated or
    rejected with an error if there's a problem with the update.