Simplified IsDir logic