Move config file from agent to supervisor

Move config file from agent to supervisor.  @bernerdschaefer 
I think O_TRUNC makes much more sense here. Also, no need to convert `0644` to os.FileMode.