remove unnecesary directory separator from path