Port configure script to Node, step 4: build distribution files.

This is step 4 of porting our configure script to Node. This version improves
on the previous by no longer needing to execute a shell command to cleanly
extract the name and version for a release.

Progress on #7.