Only initialise URL handler if cachedir set.