Try Total Commander. Select the file, "Edit file", add the lines, tap the save icon, allow everything it prompts for and that's it.
Or copy it to a folder that doesn't require root access to modify its contents (like the Download folder, for example), modify and save it there, then copy/move it...