Allow deferral directory to be overridden by an envvar
Add unit test for setting of deferral directory