Replacing FileWriter with FileOutputStream to fix troubles with running
the tests on Windows.