Save and restore folder/device settings on screen rotate (fixes #152).