added sudo to minion_id file writes
fixed sudo write minion file
merged upstream