Fix destruction of page names that end in 'index.html' e.g. 'pageindex.html'