shell style fix

Fixes for shell coding style and for potential errors with space in `$HOME` etc.