Fix error handling when outside git repos

Currently running `git deliver` outside of a repo results in the following error message:

`/path/to/git-deliver/deliver.sh: line 25: exit_with_error: command not found`

Moved the exit_with_error function to exist before its first invocation.