Previously opendir("/data") would fail if filesystem with "data" prefix was registered in VFS, while opendir("/data/") would succeed. This change fixes handling for the former case and adds relevant tests.