save last directories selected to preferences