replace popen() ls calls with globs