rename each text file according to its first line of text