import improvements from GPUJPEG - summary:
- LABEL - replace ' ' with %20 (will get to URL)
- use while instead of for..seq
- cat json file directly (avoid interpretting \n and \r that XSI-compilant
echo, as in dash, does)
- cat really the $json file, don't print its name
- wrap long lines + early return in while-loop
The rewrite of `for n in \`seq` may be perhaps a bit controversal
(with while is less readable) but technically POSIX doesn't specify the
seq comand.
When GITHUB_TOKEN was not provided, fetch_json didn't work, because it
uses positional arguments ("$@"), which were set only in this case but
not unset otherwise.