Make cache/module.py Python3-compatible

This module should now work in both v2 and v3 environments. Test as follows:

  python2 module_test.py
  python3 module_test.py
WIP: TODO