Fixed function typo and encoded the string to get wfile.write working with python3
Fixed function typo and encoded the string to get wfile.write working with python3

MFry/pyItemCatalog,MFry/pyItemCatalog,MFry/pyItemCatalog,MFry/pyItemCatalog,MFry/pyItemCatalog