devscripts: general hardening of shell scripts

- full paths to utils
- $() construct
- quoting
- prefer double square brackets
Merge pull request #2694 from rolandwalker/devscript_hardening

devscripts: general hardening of shell scripts