$TMP_DIRECTORY is a full path, while $test is not.
MAIL_DIR="${TMP_DIRECTORY}/mail"
export NOTMUCH_CONFIG="${TMP_DIRECTORY}/notmuch-config"
-mkdir -p "${test}"
mkdir -p "${MAIL_DIR}"
cat <<EOF >"${NOTMUCH_CONFIG}"
# Use -P to resolve symlinks in our working directory so that the cwd
# in subprocesses like git equals our $PWD (for pathname comparisons).
-cd -P "$test" || error "Cannot set up test environment"
+cd -P "$TMP_DIRECTORY" || error "Cannot set up test environment"
if test "$verbose" = "t"
then