synctool-diff: ran code through shellcheck.net

Ran code through http://www.shellcheck.net and applied most suggestions.
synctool-diff: read masterdir from synctool-config
Merge pull request #39 from onnozweers/patch-3

synctool-diff: ran code through shellcheck.net