Tip for anyone using greg to download podcasts: this config setting forces the downloaded files to be in chronological order, and strips any query parameters from the end of their name:

downloadhandler = wget {link} -O {directory}/{date}_{filename}

updated: