It looks like your script file has DOS/Windows line endings, e.g. Carriage Return (^M, chr(13)) in addition to the Line Feed character. The output tester[2]: ^M: cannot execute [Permission denied] certainly looks like that. This would also explain why the file cannot be executed by the shell directly: It is looking for an executable named /bin/ksh^M extracted from the shebang line, which most probably does not exist.¹
You should first try to find out if this is the case, e.g. by opening the file in an editor that shows the line endings or using file tester or even od -ah tester. Many editors can remove the CRs, as can the utility dos2unix. Under Windows, the Notepad++ editor is capable to convert line endings using the menu entry Edit -> EOL Conversion -> UNIX/OSX Format.
See also What is ^M and how do I get rid of it?.
¹ SuSE Linux used to have a funny symlink from /usr/bin/perl^M to /usr/bin/perl to allow all those random Perl scripts retrieved from the Web to work even without converting them to Unix line endings.