Standardise location of environment password/rc files.

Discussion on https://review.openstack.org/#/c/82807 highlighted the fact
that although our scripts consistently write the environment rc files
into $TRIPLEO_ROOT/, the password files are dropped in
whatever directory the user happened to run the scripts from.

Ideally these should be collected into a heat json environment file
which heat can use directly and we can query via jq; as an intermediate
step while we sort that out, this change makes sure that they at least
get written out to $TRIPLEO_ROOT/, alongside the other artifacts we
generate during a devtest run.

write-tripleorc likewise defaulted to creating a tripleorc in whatever
location the user happened to be in at the time, so I've given it
similar treatment to standardise the location of the tripleorc file.

Along the way, stevek objected to having if/then on separate lines. As
the instances in these scripts were 2/3eds of all such occurrences in the
scripts directory, I let my preference for this style override my
preference not to make unrelated stylistic changes in the same commit as
substantive changes.

Change-Id: I30a2cc4f406122bb038d314a277c2444182bd0c9
Merge "Standardise location of environment password/rc files."