I suspect that we only hit this in unit_tests because the normal monotone
runtime calls save_initial_path(), which results
fs::path::default_name_check(fs::native) being called.
With this patch, the unit tests are still dying:
key...
unknown location(0): fatal error in "signature_round_trip":
std::logic_error: key_store.cc:171: invariant 'I(i != keys.end())' violated
keys.cc(719): last checkpoint: signing plaintext
This is because app.get_key_pair() (called via make_signature() in the test)
goes looking for the key with ID 'address@hidden' in the key store and
fails to find it.
It seems wrong to me that unit tests end up inside code that looks in
~/.monotone/keys (or cares about anything to do with the environment the
test is run in that is not explicitly set up for the test), so something
probably needs to be done to either change the test to avoid this, or
refactor the key handling/key store code to be more unit testable.