Remove duplicate / for first folder in root

The URLs used to look like: /core/index.php/apps/files?dir=//Test 
After you went further into folders that extra slash would disappear. It came about due to #dir in the template, which is now '/' instead of ' ' because of the normalizePath function. I figured this is the best way to fix this without messing up anything else.