list_files : Added a check to the path before searching files.