'Creates all directories passed at the given basepath.'

def _create_dirs(self, basepath, dirs=[]):

    for directory in dirs:
        if (os.path.isabs(directory) or ('..' in directory)):
            raise IllegalPathException()
        directory = os.path.join(basepath, directory)
        try:
            os.makedirs(directory)
        except OSError:
            pass
