pattern matching is now case insensitive, and only detects directories