Symmetries of the transfer operator for $\Gamma_0(N)$ and a character deformation of the Selberg zeta function for $\Gamma_0(4)$