Moved the file selection dialog (`tauri-plugin-dialog`) into the Rust
backend commands (`write_image_file` and `write_text_file`) instead of
having the frontend supply arbitrary raw paths to write to. This ensures
that the OS-native dialog handles secure path resolution and prevents
potential remote code execution (RCE) via XSS.
Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>