More sophisticated caching

I think, the caching can be improved by:
- Allowing to specify multiple directories — so that the temporary files can be spread out across multiple disks.
- Splitting output into chunks of, say, 10 minutes each — I think, ffmpeg can do that...