Security: Fixed policy injection issue

The JSON policy file to be signed by the users AWS credentials was being
generated as a string and included user controlled data. This could
allow an attacker to inject into the JSON and modify the ACL.

The JSON hash is now being generated from a Ruby hash in order to
prevent injection attacks.