Added chapter url rewriting for conversion to file