Improve compatability and ordering in the Makefile.

* Read the distribution name and version from META.json.
* Add a `dist` target and ignore the file it creates.