By default, it seems, files created in PeopleCode have an extra blank line at the end. This is because it is using line feed (char 10) and carriage return (char 13).

This can be corrected by setting .SetRecTerminator() to just carriage return (char 13).

   Local File &File;
   &File = GetFile("newfile.txt", "W", "A", %FilePath_Relative);
   &File.SetRecTerminator(Char(13));
   &File.WriteLine("hello");
   &File.Close();

By the way there is an easy way to download files you are working with.