Fix ResolvePathCommand to support paths with a trailing /