Overhaul runUpload.sh

- Reindent, fix style issues
- Reimplement logging
- Avoid using the shell for expanding file globs
Merge pull request #1 from tgc/master

Overhaul runUpload.sh