When creating registry key, make sure parent key exists first