Add tests for torrent purging
Allow purge interval to be set, and fix variable naming