Simplify command line and options processing.

Remove some special case flag processing and rely on commander.js more.
Move referrer option from System to options.js.
Good point. @usrbincc did this part and as far as I know the tests do not cover this. We'll just have see what we need to add back.