Python3 compat

Basically Python3 compat, changed rd to include decode, did error
checking on winreg import