How to iterate an image texture and save the iteration with python
I recommend you compute your filepath using a function like this:

from os.path import isfile

def next_file_name(pattern):
    i=1

    if (pattern%1) == (pattern %2):
        raise Exception("bad file name pattern")

    while isfile(pattern%i):
        i=i+1
    return pattern%i

print ( next_file_name("/var/tmp/blender/voronoi-wave/%04d.png") )


( thanks, https://stackoverflow.com/questions/82831/check-whether-a-file-exists-using-python )