Filter dot directories during validation

It seems that glob behaves differently on 13.1 then on SLES12. The dot
directories are only listed on SLES12, that's why the issue didn't come
up during development.

I have also added a universal unit test to check for the successful
filtering of dot directories.
The style guide could use some clarification here, but the general convention is to use `do`, `end` here, as the whole expression is three lines, not one.