Get and set last directory.