Skip hidden directories correctly