Compute directory url using path manip, not filename substraction. Filename can be empty or inadequate