code: def put_directory(self, mdir):
          
          log.debug('PutDirectory %r', mdir)
          headers = {"Content-Type": "application/json; type=directory"}
          res, content = self._request(mdir, "PUT", headers=headers)
          if res["status"] != "204":
              raise errors.MantaAPIError(res, content)
docs: PutDirectory
          https://apidocs.joyent.com/manta/api.html#PutDirectory
  
          @param mdir {str} A manta path, e.g. '/trent/stor/mydir'.