Fixes suggested by shellcheck.

http://www.shellcheck.net/