Fix bad URL when using up directory function