isolate test_keygen data

This makes test_keygen use its own basedir, to avoid polluting the _trial_temp
directory for later tests.
Merge branch 'isolate-keygen-test' into ticket68