writeEachLayerToFile

Writes each layer to a separate file.