Myself i gather Jim that, all the fun in these brainstorms is to explore what has happened back in the old days; surely the episodes occurred with the (mis) behavior of gunpowder or any other 'artifacts' in present modernity, with all the existing (un) charming technology, are no doubt rather interesting but ... refer to a distinct ambiance.
Going back to a question you posed the other day Jim, i wouldn't know how to approach the problematics of gunpowder in the Age of Sail being kept down the lower (est) deck of ships, passive of humidity deterioration. Certainly there were superior conveniences like keeping it distant from hazardous situations above water line, namely fire ... caused either by accidental fire aboard or by enemy's action, with the impact of cannonry or other firing attempts. Also surely measures were taken to keep it as much hermetic as possible, by means of proper containers, those well covered and inside purposely confined spaces, where light through from other compartments would dispense the use of life (burning) light; even when someone had to go down the lower deck, the light allowed was a candle enclosed in a tin with thin holes. I have read a passage in which wet blankets covered the gunpowder cauldrons, whatever that meant; although it is evident that, the risk of fire justified the involvement of all other potential liabilities. Also to consider that, only the gunpowder necessary for possible immediate action was carried in its whole condition; the remaining was carried with the three components not yet mixed, for opportune preparation. Also a part of gunpowder was kept not loose but in sacks and later in (paper ?) cannon dosed 'cartridges', an implement started by the Portuguese ... contrary to what some 'competition' authors pretend.
Concerning the use of alcohol as in Peter's link on corning powder, also Alpoim has a go at it, in one of the processes to recuperate bad gunpowder.
Sure there were guys well within the gunpowder secrets back in those days.
For your perusal and in order not to 'soak' again
these pages with a mile long testament, this one will come in the form of a PDF.