reg.exe: Perform checks in wmain

Move as much error-checking to main as possible so sub functions
don't have to repeat basic checks

IE: Is the key on a remote system, or are we missing arguments?
reg.exe: Add path_get_key() to remove boilerplate
reg.exe: Add wchar/type conversion functions
reg.exe: Add internal error string
reg.exe: Add wchar/raw data conversion functions
reg.exe: Implement query functionality
reg.exe: Clean up reg_add
reg.exe: Clean up reg_delete