Make sure streams get flushed and closed - otherwise we may be losing
messages sent to the logging system, especially on platforms where
line ends are neither \r nor \n - for example OS/390.
Reported by: Myron Uecker <uecker@us.ibm.com>
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269339 13f79535-47bb-0310-9956-ffa450edef68