Make script more portable by updating shebang
Use heredoc for help messsage
Perform operations in memory by default, optionally conserve memory by writing temporary file to disk
Added option for fast (lower quality) output via gifsicle, and provide further file optimizations with gifsicle