add PutForEnvironmentAndCheckHash method

It's needed for the charm store.
s/of both the above/for both of the above/ sounds more clear to me, but I'm not sure it's correct :)