HPCC-12053 Index writes were broken by last change.

Index (+ keydiff/keypatch) writes were incorrectly testing for
TDX* flags, as a consequence they were incorrectly mangling the
output filenames with temporary scopes, which could not be found
on lookup

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Merge pull request #6343 from jakesmith/hpcc-12053b

HPCC-12053 Index writes were broken by last change.

Reviewed-By: Gavin Halliday <gavin.halliday@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>