Add option to set container/temp directory for multiple simultaneous streams

Rebased and edited. Fixes #87.