testXHTML: use suprocess instead of obsolete popen and close file descriptors explicitly