Ignore the above solution, it doesn't work. Good thing is I managed to reproduce your problem and but bad thing is in the process screwed my working system too and I haven't figured out how to fix it now. Working on it.
I think its some environment variable with bash which always sets dos EOL. dos2unix changes the md5sum of the file and hence the execution fails.
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.