Changed delete_files() to use the delete_in_dir() function, which