The attached patch assures that we're properly managing the internals of FILE objects when performing redirections.