locksmithctl/d: set flags from environment

Following on from #39