Finished script that auto-populates config file based on reading images in a specified directory.