This question strikes to me as a very interesting question about definitions. Your argument that
$$\int_{(a,b)}f'(x)dx=0,$$
using the Stokes theorem sounds right to me, because after all $(a,b)$ is a $1$-manifold with empty boundary and $f'(x)dx$ is a exact $1$-form on that manifold. In the other hand
$$\int_{(a,b)}f'(x)dx= \int_a^b f'(x)dx,$$
where the integral on the RHS is the usual Riemann integral. But obviously is not true that
$$\int_a^b f'(x)dx=0 $$
for every function $f$ defined over $(a,b)$. So what is wrong ? What is wrong here is the fact that the integral over $(a,b)$ (as a manifold) is not well defined for every $1$-form, more specifically over a open manifold we only can integrate forms with compact support, so the integral $$\int_{(a,b)}f'(x)dx$$ only makes sense if the form $f'(x)dx$ has compact support, and as oberved by Fillipo equation
$$\int_{(a,b)}f'(x)dx=0,$$
only makes sense (in the sense of using the stokes theorem) if the form $f(x)dx$ have compact suport, but in that case near the extremes of the interval $(a,b)$ the function $f'(x)$ is zero, what does not contradicts the equation
$$\int_{(a,b)}f'(x)dx= \int_a^b f'(x)dx = f(b)-f(a).$$
So your argument sounds ok to me, you only have to restrict yourself to function $f$ with compact support.