s:sessiondir() refactor