Fix fernet key writing for python 3
Fix fernet key writing for python 3

When fernet is used to generate a key, it's returned as bytes in
python3 (it's a string in python2).

Writing bytes to a file stream is not allowed if the file is not
binary mode:

   File "/opt/stack/keystone/keystone/token/providers/fernet/utils.py", line 124, in _create_new_key
     f.write(key)
 TypeError: must be str, not bytes

We want the file to contain a string that the admin can look at
rather than bytes so decode bytes to string.

bp python3

Change-Id: I53057a31e3d753bfdae107c0d99bb2fb011741e6

ajayaa/keystone,himanshu-setia/keystone,rajalokan/keystone,mahak/keystone,cernops/keystone,ilay09/keystone,openstack/keystone,mahak/keystone,dims/keystone,himanshu-setia/keystone,ilay09/keystone,rajalokan/keystone,cernops/keystone,maestro-hybrid-cloud/keystone,klmitch/keystone,openstack/keystone,openstack/keystone,rajalokan/keystone,maestro-hybrid-cloud/keystone,mahak/keystone,ilay09/keystone,klmitch/keystone,dims/keystone,ajayaa/keystone