really this is testing for dot folder not hidden. since 'hidden' folders need attribute checking..which is a pain since now you have to worry about which os..  semantics.