Moving build script into Emacs

Now that I am more used to writing Emacs Lisp code, I find it
easier (and nicer) to write my shell scripts in it, so a likely
candidate was my build process, which was primarily lisp code in the
first place.