Correctly write plots to the figures/ directory