Correctly order defer directives
Correctly order defer directives

defer directives are executed in LIFO order, so order them such that the
temporary file is closed and then removed, not the other way around.

mgyenik/go,mgyenik/go,mgyenik/go,mgyenik/go,mgyenik/go,mgyenik/go,mgyenik/go,mgyenik/go