Check and create directories.

        If the directory is exist, It will remove it and create new folder.

        :type paths: Array of string or string
        :param paths: the location of directory

def check_and_create_directories(paths):
    """
        Check and create directories.

        If the directory is exist, It will remove it and create new folder.

        :type paths: Array of string or string
        :param paths: the location of directory
    """
    for path in paths:
        if os.path.exists(path):
            shutil.rmtree(path)
        os.mkdir(path)