1. The assumption that $I$ is perfect is a fancy way of saying that $I$ contains a nonempty open interval, which is required to define the derivatives. It rules out the case that $I$ contains just a single point; it would be silly to define $C^n(I;\mathbb{R})$ in that case.
2. You are mistaken in writing $g(x) = 0$. The higher-order terms in the sum do zero out, but the $k=0$ term remains: $$ g(x) = \sum_{k=0}^n \frac{f^{(k)}(x)}{k!}(x-x)^k = f^{(0)}(x) = f(x). $$