Stable5 single dot dirs

Raising as PR since this affects the core.
Also, good to let Jenkins test this on stable5.

Please review @icewind1991 @karlitschek @DeepDiver1975