Updated environments/list-envs for new format.

Updated environments/env-names.
Updated "props" and "files" commands for new format.
Updated "templates" command for new format.

Encapsulated more logic into environments/env-names, used by both list-envs and envs-by-dep.