Fix setting up the pagure hooks when there is no DOCS_FOLDER set
On a pagure instance where the documentation hosting is disabled, the
DOCS_FOLDER variable is set to ``None`` and this makes installing the
pagure hook crash if we're not careful.
This commit fixes this situation and test it so it doesn't happen again.
Relates to https://pagure.io/pagure/issue/2462
Signed-off-by: Pierre-Yves Chibon <firstname.lastname@example.org>