Use infile instead of indir, for more flexible testing
Preserve input as arrays, instead of splitting them to just separate lines
Mention jq as a prerequisite