Added new method: "writeTextToFile"

Method accepts both strings and string arrays