synctool-diff: ran code through shellcheck.net

Ran code through http://www.shellcheck.net and applied most suggestions.