distinguish between folders and bundles when determining UTI

Fixes a small bug introduced with #1708. System Preferences and Xcode Projects (and I’m sure other types) weren’t being properly recognized.