Updated to store SECRET_KET in a file by default.

Added generatesecretfile management command and util functions to create
and read the secret key file.