Fix memory leaks.

During preprocessing, when generating the report, brains are plotted. Matplotlib tends to leak memory when plots are not closed properly after plotting. This PR simply closes plots after saving.