Fixed the config writing code, it has been broke since setup moved to lib :(
Expanded config code to support 'production' and 'development' templates.
Added an option to choose production or development template.
Removed debug config.
Updated .gitignore to ignore the debug config.