<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _initIndexDir(self):
 """makes sure purrlog directory is properly set up"""

        if not os.path.exists(self.logdir):
            os.mkdir(self.logdir)
            dprint(1, "created", self.logdir)
        Purr.RenderIndex.initIndexDir(self.logdir)