Replaced the hardcoded target directory by a file dialog.