Use correct interface to set base dir in md_inc tool

And two more small changes.