Overlays: In case of folders, make sure to append slashes at end.

This fixes #2373