Add proper path handling to env script.