Added optional parameter to always write into directories even in case of DOP = 1.
Extended FileOutputFormatTest.
Some code beautifications.