allow some template expansion inside the check/commit commands
clean up tests and make absolute paths in emitter
add tests for command templating