add rake task to restore paths of ontology versions

This just adds the code I used to fix #1034 as a rake task.