UI: Fix preferences--only try to backup prefs if they exist.

This was introduced in a Coverity fix and should have been noticed by
seeing the failing tests.