Please post a full project (lpi+lpr) which shows the problem. Since you say that Bart's simple program has the same issue there must be something completely wrong.
Do you see the issue only with fpc/Lazarus programs or, for example, also when you call "dir c:\Windows\System32\*.*"?