spaces to tabs
change runtask to only only test optimizing non-layer images
Omit redundant IDATA chunks and make sure we have IEND
Based on patch contributed by Eugene Feingold on googlecode