There's quite a number of options, actually. As far as downloading previous shows goes, the iPlayer itself (in its desktop app form) can manage that. As for recording streams, I'm aware of two freebies that are claimed to do the job: get_iplayer and SDP Downloader. The second one even provides means of using a UK-based proxy server in case you'd want to record something whilst travelling abroad.