tests: Fix setup of ephemeral home directories.