Small python3 compat in vault to keep code in sync with v2
Merge the vault tempfile fix to the v2 tree