Update addScript to handle a single string or an array of filepaths.