When dropping a file to your App, sandbox grants only access to this file. You can't even rename it. To write a new file in the same directory, use an NSOpenPanel to get write access to the directory.
eg:
- (void)showGrantAccessForFolderOfFile:(NSURL *)urlOfFile
{
NSURL *urlToGrant = [urlOfFile URLByDeletingLastPathComponent];
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
[openPanel setAllowsMultipleSelection:NO];
[openPanel setCanChooseDirectories:YES];
[openPanel setCanChooseFiles:NO];
[openPanel setCanCreateDirectories:NO];
[openPanel setDirectoryURL:urlToGrant];
[openPanel setTitle:@"Grant Access To Folder"];
[openPanel setMessage:@"Please grant access to the file’s folder"];
[openPanel setPrompt:@"Grant Access"];
// then run the panel as in documentation and handle errors
// could also set a delegate and grey out other directories
// store the sandboxed to access it later again
}