Added unit tests for config file permissions, and now creates config file with correct permissions initially