DRY up pre-commit hook a little
DRY up pre-commit hook a little

Added in_path? and staged_files methods to factor out some common logic.

Change-Id: Id24bb0f238f58baeffefde08a1ea6f5b12618dfa
Reviewed-on: https://gerrit.causes.com/5003
Tested-by: Lann Martin <564fa7a717c51b612962ea128f146981a0e99d90@causes.com>
Reviewed-by: Noah Silas <1db01d43e08596f43a65fb393d969b98ee5b4dc6@causes.com>

blech75/overcommit,TheSooth/overcommit,oxocode/overcommit,gnagel/overcommit,TheSooth/overcommit,gnagel/overcommit,blech75/overcommit,oxocode/overcommit