# File lib/patron/session.rb, line 88
    def handle_cookies(file = nil)
      if file
        path = Pathname(file).expand_path
        unless File.exists?(file) and File.writable?(path.dirname)
          raise ArgumentError, "Can't create file #{path} (permission error)"
        end
        unless File.readable?(file) or File.writable?(path)
          raise ArgumentError, "Can't read or write file #{path} (permission error)"
        end
      end
      enable_cookie_session(path.to_s)
      self
    end