normalizePath static method
Collapses empty segments and forces a leading slash.
The real Vfs contract leaves normalisation to implementations; this fake
declares its own rule so consumer tests are deterministic.
Implementation
static String normalizePath(String path) {
final Iterable<String> segments = path
.split('/')
.where((String part) => part.isNotEmpty);
return '/${segments.join('/')}';
}