Configuration improvements

 * Write configuration as non-unicode (required for secret key)
 * Added possibility to configure host as script parameter