Write linear fits

Adding a basic linear fits writer, and adding tests
don't write to data_path