Make some changes based on shellcheck.

http://www.shellcheck.net/