Making setting environment simpler: setting path automatically

Oops, here's a new pull request with only the automatic path setting.