Factorize template variable @LOCALSTATEDIR@