Optimize IDO queries.

Refs #5124
Glob: Use stat() instead of lstat().

Refs #5123