We don't know when the caller might be done with a stream, so we can end up with code overwriting things in a stream that is in use elsewhere. Solve the issue by returning a new stream each time and leave it up to the callers to free it.
Fix issue #192 Signed-off-by: Henrik Andersson <hean01@cendio.com> Signed-off-by: Karl Mikaelsson <derfian@cendio.se>