Fix missing final STDIN newline when spawning ImageOptim

When providing a list of paths to ImageOptim as a list separated by newlines, the last file is never processed because the final newline is missing.