Added pre- and post-actions, including a flag to disable it when a git directory is detected.