Autoconfigbackup - Use proxy when required, and minimal code cleanup

2nd attempt ;)
Please remove $config from parameter and use 'global $config' to have access to it