Creating text file with the image paths given a folder of images