Below is an example script that approximates your script, and saves the data table and the report output. I used the Big Class data table from the $SAMPLE_DATA folder, and saved it as a txt file.
Names Default To Here( 1 );
filepath = Pick File( "Select Source Data File", "$DESKTOP", {"txt files|txt"} );
dt = Open( filepath );
// Run the Plot, adding a pointer to it, so you can manipulate it later
op = Overlay Plot( X( :age ), Y( :height, :weight ), Y Scale( Left, Right ) );
// Determine the directory to write to
ThePath = Substr( filepath, 1, Contains( filepath, Word( -1, filepath, "/" ) ) - 1 );
// Save the data table
dt << save as( ThePath || "New Data Table.jmp" );
// Save the output. Here is a jpeg version, but other output
// options are available. Go to Help==>Scripting Index
// for additional options
Report( op ) << save picture( ThePath || "The Report.jpg" );
Jim