Remove trailing slash from prefix