Added possibility to define fileMode in standard export

With this change it is possible to choose between write and append mode which is useful
for chunked exports.

We use it here at our company to export 1.8 Million rows to a single csv file, which takes a large amount of memory if not written in chunks.