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
Why not use `rtrim()`? http://php.net/manual/en/function.rtrim.php