Set the environment accoring to the current working directory