At interpreter shutdown, the module's global variables are set to None before the module itself is released. See warning at http://docs.python.org/2/reference/datamodel.html#object.__del__ for more details.
Merge pull request #3 from riverfr0zen/master

Fixes some issues with globals being set to none in __del__