Make release.sh smarter, fix #1043.
Merge pull request #2069 from gittip/fix-release.sh

Make release.sh smarter, fix #1043.