Sadly it was a Code 18 (the problem was 18 inches from the computer screen - better to admit it than confuse others). The script that deleted the session was called from another script that opened the session object. I'm thinking that when the inner script did the delete the OS prevented the unlink becase the outer script still had an open object.
Either way, it works now.
Regards.