Fix temp files not being deleted, catch unexpected responses (MIME "text/...")

Signed-off-by: JWhy <jwhy@jwhy.de>