Remove slashes in path logic