Include commit and if the tree is dirty in builds of -head versions

Implements request in #105