Add ability to honour --localstatedir directive