Move recursion functionality of png_optimize_all into loop.

Now the filelist for the next iteration is generated the same way as
before for the recursive call.
style.