On Hodge polynomials of singular character varieties