script: remove bashisms
The shell check utility detected a bunch of problems regarding POSIX
compliance for the `arm-image-installer` script. This commit fixes them
all and removes all `shellcheck`'s warnings.
Signed-off-by: Gabriel Duque <gabriel@zuh0.com>