Fix for Issue-9413, removed use of 'with open' python 2.5+ feature

minimal change for issue 9413.