loop over arrays/globs instead of parsing LS

http://mywiki.wooledge.org/ParsingLs
Merge branch 'parsing-ls-fix'