shouldn't $location only be added, if we have no trailing / at the beginning of the filename string?