I assume you use PAGESIZE 50000 to avoid page breaks. If you change this to PAGESIZE 0 you won't get the initial blank line.
I tried running your code (with my own sql statement) and I didn't see a blank line at the end of the file, only at the beginning.
The TRIMSPOOL setting is causing trailing space characters to be removed from the end of each record. Without this you could add an expression like RPAD(' ',50) to get 50 spaces at the end of the record, but this extra 50 spaces will be removed while TRIMSPOOL is used.