Fabfile fix for python 3

Although fabric is not out yet for Python 3, one day it will be.

The updated secret key generation code is compatible with both Python 2 and 3