Checking to see if HKCU key exists. Fixes #1685
Fixes #1685

If the registry keys do not exist, appropriate registry keys will be created now.
Reformatted code
Merge pull request #1692 from Particular/issue-1685

Checking to see if HKCU key exists. Fixes #1685