I know that it’s possible to take a text file and read it, but is it possible to then write on that text file too?
Of course. This is basic functionality every programming language provides. 1
http://forum.unity3d.com/threads/5084-Can-I-read-and-write-text-files-using-Javascript