Display appropriate error message on config error

When a key is missing in configuration, e.g. the redis key, then the dir is `nil` which leads to a confusion exception traceback. This prints an error and aborts checks. It's also referenced here: https://github.com/gitlabhq/gitlabhq/issues/5603