use the collapsed path in the run_cgi method (closes #19435)