Introduced CREATE and OVERWRITE file output write modes.

Introduced CREATE and OVERWRITE file output write modes. OVERWRITE is default (as before).
Rewrote code for file output path preparation.
Fixed distributed writing to local filesystem #286