Ensure child_mem_fd is valid before the tracee exits.

Resolves #738.