replace globber in scan_dir()