That would be a bug - the spec should be first.
EXACTLY HOW are you generating the file(s)
If i right-click on the package, and say 'Save Package Spec and Body...' - I get a file with the spec listed first, followed by the body.
developer found issue with Tools > Export, logged and hopefully fixed for 4.2 production
I select the package body and the specification with Contol + left-click, then rigth-click on package specification > Fast DDL > Save to clipboard.
With right-click on the package, and 'Save Package Spec and Body' works well.