You added: export HOME=`mktemp --dry-run`This sets HOME literally to `mktemp --dry-run`. I think you wanted to say:
export HOME=$(shell mktemp --dry-run)But there's a good reason --dry-run is described as “unsafe” in the mktemp manpage. So how about something like this instead:
export HOME=$(CURDIR)/nonexistent ? -- Jakub Wilk