Fix some shell issues by adding quotes and replace backticks with $()
This patch fixes the following issues reported by shellcheck:
- Quote default assignments (SC2223)
- Use $() instead of backticks (SC2006)
- Double quote $@ (SC2068)
- Double quote variables in if-statements and other places (SC2086)
While here, fix a whitespace at one end of line instance in the license
text.
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D40604