Refactor runDubCommandLine to use less indentation/nesting.