function dirname(glob) {
        if (glob.slice(-1) === '/') return glob
        return path.dirname(glob)
      }
Creates a request signer, used to asynchronously build a signature
for a request (does not have to be an http.ClientRequest).

@param {Object} options, either:
                  - {String} keyId
                  - {String|Buffer} key
                  - {String} algorithm (optional, required for HMAC)
                or:
                  - {Func} sign (data, cb)
@return {RequestSigner}