HPCC-10552 Fix regression calling close(-1) (caught in windows debug)

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>