<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def cleanDir(self):
        ''' Remove existing json datafiles in the target directory. '''
        if os.path.isdir(self.outdir):
            baddies = ['tout.json','nout.json','hout.json']
            for file in baddies:
                filepath = os.path.join(self.outdir,file)
                if os.path.isfile(filepath):
                    os.remove(filepath)