Maybe something simple like
fhnd = fopen(filename) // Open file, or create
string = freadln(fhnd) // Read the next line
fwriteln(fhnd, string) // Write a line to the end of the file
fclose(fhnd)
Doesn't even need to support folders, if it wanted to be limited. ie, all files are writing into \GARMIN\APPS\FILES