fix for #424 checking for dry run option before running hooks.

Solution for issue #424 .  Checks the dry-run flag before running hooks.  If dry run is set hooks will not run.