Fix generation of hash in config.

Was generating with literal '\n' instead of newline
Fixed ruby style
Merge pull request #356 from atward/fix-config-hash

Fix generation of hash in config.