Really fix issue #405 and #536.

Yet another issue caused by not using the Preferences class and manipulating the qbittorrent.ini directly.