Wp 581 command line args

Better command line processing by using optimist

http://jira.webinos.org/browse/WP-581