Removed use of variable "enviro" from IOUtilities, plus other tweaks.

In addition to the aforementioned eradication of "enviro"
(renamed/tweaked to "currentEnvironment" in most places), wrapped debug
output and actions in debug macro (IOUTIL_DEBUG) for cleaner output.