[Path.removeTrailingSlash()](https://github.com/HaxeFoundation/haxe/blob/development/std/haxe/io/Path.hx#L212) can't come soon enough.  Have to wait for Haxe 3.1 I guess ;)