factor out CLI args handling in a separate namespace

As @oakes observed in his comment in #41, this PR factors out the CLI args handling in a separate namespace. It also fixes a minor corner-case where invoking the standalone JAR with simply `-s` throws a cryptic exception instead of printing an error message.