getTempfile(): Fixed oops in error return check