Improve performance (#505) by only running auto-alt (and auto-perms)
when HEAD has changed after calling a git command, e.g. after committing
or pulling new changes.
Also use this new information to remove stale symlinks when an alt file
has been removed.
FixesTheLocehiliosan/yadm#226
When a config file path is passed to yadm whose parent directory does
not exist, git (and hence yadm) fails without writing the file.
Yadm should, however, make sure that the directory exists s.t. git can
just write to the file.
The new test system is written with py.test. These tests are more
comprehensive, run faster by an order of magnitude, and are far more
maintainable. The tests themselves conform to PEP8.