refactor s:sessiondir() for readability