Adds a trailing slash to the path if it does not have one.
String addTrailingSlash(String path) { if (!path.endsWith(kPathSeparator)) { return '$path$kPathSeparator'; } return path; }