Add a release script

The Makefiles were mostly filled with a complex shell script written in
m4sh. Moving that out into a separate script helps debugging and
compatibility, and in general makes life better.
Should we omit the `-a` option here so that we don't unintentionally add a bunch of files? It'd also be consistent with the other build commands to exclude this option.