Tweaks to multidir

This is fixes for some of the small things in the multidir PR. I haven't gone through to find everywhere they might need applying, so have a look at them and try to do the same in your own code.