removed support for top-level saveAs from rules, fixed bug concerning `restore`