Which scripting guide are you using for reference? I've only ever used things like filePutDialog() for writing text files, and I'm pretty sure you can't save a project in that way. For that you would need to use the app.project.saveWithDialog() method.