Functions for interacting with, saving and restoring R sessions.