Ultrafilter-compact subspaces of Hausdorff spaces are not necessarily closed I am trying to follow a proof in Herrlich's Axiom of Choice:

Currently, I am trying to prove the highlighted sentence. For $f$ to be an embedding it has to be a homeomorphism of $P$ onto $f(P)$.
I have already been able to show that $f$ is injective and am trying to show that $f^{-1}$ is continuous.
At first I thought, there could be an generalization of the classical theorem for compact spaces

$f \colon X \to Y$, continuous, invertible, X is compact and Y is Hausdorff then $f^{-1}$ is continuous

but there isn't. The fact that compact subspaces of Hausdorff spaces are closed is crucial for this proof and won't hold for ultrafilter-compact spaces (this is in fact a conclusion to be drawn from the excerpt I posted)
Another characterization of homeomorphisms is, that they are bijective, continuous and open/closed mappings. Here is an idea:
Based on my previous question, it suffices to consider subbasic elements of $2^I$. Let $O$ be such an element, i.e.
$$ O = \prod_{i \in I} O_i$$
with $O_i = \mathbf{2}$ for all $i \in I \setminus \{i_0\}$ and $O_{i_0} = \{1\}$. $O$ is clopen. 
Suppose $O \in \mathcal{F}$. This implies that $f_O(O) = 1$. The set 
$$U = \prod_{A \in X} U_A$$
with $U_A = \mathbf{2}$ for all $A \in X \setminus \{O\}$ and $U_O = \{1\}$ is open in $\mathbf{2}^X$ hence $f(O) = U \cap f(P)$.
Is this correct? What about the case where $O \not\in \mathcal{F}$?
 A: So for all $A \in X$, where $X$ is a clopen member of $\mathcal{F}$, $\pi_A(f(x)) = f_A(x)$, where the latter is the characteristic function of $A$. And $P = 2^I$.
So clearly $f$ is continuous, as the composition with any projection is continuous (as $A$ is clopen, $f_A$ is continuous), using the universal property for product topologies. So the same holds for $f$ considered as a function from $P$ onto $f[P]$. 
If $x \neq y$, then there is a clopen subset $F_x$ in $\mathcal{F}$ such that $x \notin F_x$ (or $x$ would be in the intersection of all such $F$ etc.). Also there is a clopen set $C$ such that $y \in C$, $x \notin C$, as $P = 2^I$ is zero-dimensional. Then define $F = C \cup F_x$. Then $x \notin F$, $y \in F$, $F$ is clopen (union of two clopens), $F \in \mathcal{F}$, as the smaller $F_x$ is. So $\pi_F(f(x)) = 0, \pi_F(f(y)) = 1$, so $f(x) \neq f(y)$. hence $f$ is 1-1.
Consider $O = (\pi_{i_0})^{-1}[\{j\}]$, a subbasic open set of $P$, where $i_0 \in I, j \in \{0,1\}$. If $O \in \mathcal{F}$, then $O \in X$ and for every $x \in O$, $\pi_O(f(x)) = 1$, so $f[O] = (\pi_O)^{-1}[\{1\}] \cap f[P]$, making $f[O]$ open in $f[P]$. 
If $O \notin \mathcal{F}$, then either every $F \in \mathcal{F}$ intersects $O$, or at least one $F' \in \mathcal{F}$ misses $O$. In the latter case $F' \subseteq P \setminus O$, and we have the same argument for $P \setminus O$ which then is a member of $X$ (being clopen and in $\mathcal{F}$). So we can in the final case assume all $F \in \mathcal{F}$ intersect $O$ and also intersect $P \setminus O$. But then $f[O] = f[P]$, also open in $f[P]$, trivially.
(in short, if $O$ or its complement are in the filter, then $f[O]$ is a relative subbasic element corresponding to the set in the filter, otherwise it intersects both and $f[O] = f[P]$)
Then the remark about injective functions preserving finite intersections makes sure the images of basic elements from $P$  are open in $f[P]$, and so $f$ is open from $P$ onto $f[P]$, conclusing the proof.
