Safe parsing of command line parameters in enc console app

List of changes :

1. Check i < argc before accessing argv[i]
2. Use "if - else if" instead of "if with continue stmt" for consistency with other parts of the code.
3. Removed some unused variables.