fix the handling of overlays (gentoo bug #376775)

do not even try to open a non-existent directories
Merge pull request #14 from bor/fix/overlays_handling

fix the handling of overlays (gentoo bug #376775)