there's a general function to find the canonical filename (%s/"%03i.%s"  % (path,counter, extension), given the counter i. we should use it everywhere.