Added a class to write to text file

If you need help understanding, ask me.
This can be used for anythiing