This takes advantage of the debug logging done by missingh, and I added my own debug messages for executeFile calls. There are still some other low-level ways git-annex runs stuff that are not shown by debugging, but this gets most of it easily.
So, I have a type checked safe handling of filenames starting with dashes, throughout the code.
still not used