sim: sh: fix various parentheses warnings

Add parentheses to a bunch of places where the compiler suggests we
do to avoid confusion to most readers.
2 files changed