add a convenient path:lines function (accumulates list and strips newline)