Separate CLI options and locals

[closes #1652]

Original patch by: Forbes Lindesay <forbes.lindesay@red-gate.com>

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Merge pull request #1759 from jadejs/sepaate-cli-options

Separate CLI options and locals, fixes #1672.