The reference to the letsencrypt executable is only in the deprecated function that I am actively trying to rewrite, and is no longer being executed. It is merely there so I can reference it as I move forward, and will be eliminated at some point entirely once I get things working satisfactorily.
And yes the do_intermediates is the other function I am actively trying to eliminate altogether. I'm not even certain that the do_roots function should be necessary. Thank you very much for the long explanation of why I want to eleminate these things.