Make the FileStream::close method actually wait for the underlying FD to close.