For now let $f\in S_2(\Gamma_0(N))$ and define $I(\alpha,\beta)=\int_\alpha^\beta f(z)dz$. If $M\in\Gamma_0(N)$ it is immediate to prove that $I(\alpha,M(\alpha))$ is independent of $\alpha$: this uses (1) modularity which shows that $I(M(\alpha),M(\beta))=I(\alpha,\beta)$, and (2) the fact that $f$ is holomorphic, so that the evident contour integral vanishes.

My question is what happens in higher weight $f\in S_k(\Gamma_0(N))$, where $f(z)dz$ is no more an invariant differential. It is natural to consider the period polynomial $I(\alpha,\beta)=\int_\alpha^\beta(X-z)^{k-2}f(z)dz$, and modularity again shows $I(M(\alpha),M(\beta))=I(\alpha,\beta)|_{2-k}M^{-1}$. But I cannot seem to use holomorphy to deduce something analogous to the weight $2$ case. Am I missing something ?