Registry key lookups are not case sensitive

Also, close reg key when we don't need it any more.