Add CLI option to load config file from path.
Write config to specified config file.
Also fix errors in loading the config file by making it a global variable.
Change the extension from 'tmp' to '.tmp'.
Merge pull request #32 from Hamuko/master

CLI option to specify config file location