Yeah, after long debugging session on IRC it turned out that it was problem with file encoding. His script.pas was saved as unicode with BOM.
So for future reference - save your files either in ASCII format or in UTF8 without BOM.
Thanks to Falcon and urraka for helping as well.