rewrite dyn_saveas, dyn_figure to take the options they need as arguments

This is a first step in the long road to completing #1414