Fix for Directive import routing issues

- Controls import was missing a route for the case of contracts.

- Template import download for directive section had heavy viewfunction duplication, which was DRYed up from 3 functions to 1.