NROER data entry script modifications.

- While saving the resources - PDF, Image thumbnail creation code added.
- *teaches* relation's hierarchy checking code added.