smithy: shell style improvements

- put variable expansions into quotes where possible;
- fix couple of minor issues.

Change-Id: I56576250f428aee75c3e8d7154b287a080cb596c