Fixed #22056 -- Empty directories shouldn't be included to test modules

Additional check if module is valid by if '__init__.py' inside module.