A version sub-command is implemented. A local install target is added to Makefile, to set version from git at build. Fixes #840.