Tools: DeviceFiles: fixed runtime type change of instance_id

This made the function only recognize only one template file
because after that instance_id would be an int and thus
it wasn't in the dtring list node.get('instances').split(',')
anymore.