Fix allow_failures' value
Explicitly close file objects on fdopen

IO.open(fd) creates an IO object from fd, but if the fd is already used
by another IO object, the original object can't know the fd is used by
the new object. Therefore if new one close the fd, old one usually happens
to get EBADF.

On worse case the fd is recycled by yet another independent IO object and
old one can close the fd without trouble. But the victim IO object hit EBADF
because the fd is already closed. Following is such case and it is
closed in lazy sweep.
http://c5632.rubyci.org/~chkbuild/ruby-trunk/log/20130316T050302Z.diff.html.gz