Incorporate changes in self_initializing_hook branch
Implement configurable expansion based on Mercurial templates.
NOTE:
Relying on pretxncommit-hook to write in working directory
might break in the future as it relies on a buggy race condidition.
[issue273]