Fix problem with use of attr instead of prop

Change the attr method to prop, because there is no 'tagName' attribute
 and for this situation we should use prop.
Remove windows break lines with the dos2unix command