Check for correct file extension of template in rst filter.