remove trailing slashes on FileSystem.kind