Added hooks for running custom commands.

I suppose I could add more hooks, but these were the only ones that needed. Easy enough to add more if there is any future need.

Closes #8.