Write a sample to disk. This creates a folder in which the model and data are stored. The sample can then be read via the sample(String) function.