Refactored directory glob.