removing trailing slash on PATH