Write a cached name to disk.

        :param type_: str, "user" or "tag"
        :param id_: int, eg. 123456
        :returns: None

def put_name(self, type_, id_, name):
        """
        Write a cached name to disk.

        :param type_: str, "user" or "tag"
        :param id_: int, eg. 123456
        :returns: None
        """
        cachefile = self.filename(type_, id_)
        dirname = os.path.dirname(cachefile)
        try:
            os.makedirs(dirname)
        except OSError as e:
            if e.errno != errno.EEXIST:
                raise
        with open(cachefile, 'w') as f:
            f.write(name)