Removes trailing slash on PATH component