Fix default cookie path computation, close #1301