Updated OptimizeCommand to use dumpOptimized

Signed-off-by: Barry vd. Heuvel <barry@fruitcakestudio.nl>
Merge pull request #595 from Barryvdh/patch/optimize

Updated OptimizeCommand to use dumpOptimized