Make the files mapper recursively

This resolves issues on windows, when a parent folder had an index in the past
but the conflicting folder has been removed. Previous to this patch this would
cause a mess on the MappedStorage, since new children are not added to the
correct folder anymore.

Now the method is build recursively, so it correctly uses the parent physical
path instead of trying to recalculate it.

Fix #11103

@th3fallen @DeepDiver1975 @rperezb @icewind1991 @jnfrmarks
This would never be a valid check. `substr(..., -1)` will always return a string with a length 1 (because it will just return the last value), but `\\` has the length 2.