Refactored config and functions

- Config file should go outside of hooks-dir, so it can be per-project.
- Read config from within functions.sh.
- Simplified dirs with variables.