remove env script name from path.