Added an option to specify the location of the legend through the argparse module and implemented a sorting of the globbed filenames so that a consistent order of plotting is obtained