New save output

Saving diffraction intensities into different file formats
Can you add a helper function 

```python
def encoding_writer(f, ln):
    f.write(ln.encode('utf-8'))
```

and use that instead of having the `encode` explicitly on each line?