better handling of tmp file for PUT

Should be ok for windows now…
requirements documented
fixed breaking changes
close tmp file after use
bug on session handle check
more generic defaults