Stop NPEs from directory scans (silly listFiles() implementation).