Jambo B, you don't need to set the write path for any platform.
If you just use the default, AppGameKit takes care of the rest.
For initially opening a file, it will look in the media directory.
If you want to update the file, AppGameKit then writes it to the sandbox area appropriate to the platform. Subsequent reads of the file will use that location and the one in the media directory will be ignored.
This holds true only when the file name is the same.
You can create a new file with the appropriate commands and it will automatically be stored in the sandbox area.
I found it generally safer to not mess with commands that changed the active directory. They may be better in V2, but in V1, they always caused me problems.
You can use directory paths like '/media' and '/media/somesubdir' to explicitly set where you want to work. The AppGameKit app will create a media directory (and any subs) that are indicated in the sandbox area for any new or updated files.
Cheers,
Ancient Lady