Make dos and Exec::DoIO() more resilient against buggy filesystem handlers