Fix: problem with cli option definition
Fix: logical error on processing --optimize option, it was setting the wrong file action

Now listdir and walk are used for non recursive and recursive processing respectively