pathspec can be provided as a list in the options array
refactoring, extracted string_from_lua_list function