How do I correctly use applescript 2.3 script library "use" rather than "tell"
I have just discovered that you need to add explicitly use scripting additions to have the display dialog command recognised properly.
Once you start using use then apparently other libraries, otherwise normally available by default, have to be explicitly included by their own use statements.

So add 

use scripting additions


to the client of the library (my first file above) and it will compile and run as intended.