Save buffer before adding to git-annex.
Call GIT-ANNEX-LOCK-ANNEXED-FILE when the buffer is killed.