Extract a couple of methods
Extract a couple of methods

I'll be adding a method similar to `run_cli_with_rc_flag`, so I extract
some methods so I can reuse them later.

DavidAnson/markdownlint-ruby,markdownlint/markdownlint,mivok/markdownlint