Add a method for downloading files to a specified directory.