fix image indexing at end of rst file
apply new patch script on rst