reg.exe: Add path_get_key() to simplify key acquisition
reg.exe: Add wchar_get_type() conversion functions
reg.exe: Fix stack overflow on large registry keys

This will chop off the end of the string meaning missing newlines
but I figure it's better than a stack overflow
reg.exe: Add reg query support