Some OS services on Mac OS X are accessible though weird objective C calls, and the Foundation package makes it less painful.
For example, saving a file in a user directory have to be done though a special bookmark that contains the user agreement.
I have an example here: https://github.com/nraynaud/FusionExport/blob/master/Export.py#L262
Thanks.