self.get_cookie uses ~USER instead of the HOME path

The method self.get_cookie should use ENV['HOME'] for the home path instead of ~ENV['USER'].  ~ENV['USER'] is not a valid path on windows while ENV['HOME'] is.