Make basic script more portable

Also fix #805
Refine definition of debug release

Allow "Release Candidates" to be considered "official releases" rather
than Debug releases.