added better error handling to vault writing, always use a tmp
vault file for writing. added matching unittest to check if
the code catches a disk full error.