renamed methods, added methods

added method for reading file and replacing strings from it, and a
method for writing an array to a file, by line = index.