ensure that just a path can be passed to getCookie