stdlib warning fixes using shellcheck

see https://github.com/koalaman/shellcheck