An edge case when installing themes

If theme_dir is not writable a wrong method is guessed when installing from a directory and no error messages are given, the installation seems successful, while it is not

Signed-off-by: emanuele <emanuele45@gmail.com>
Merge pull request #376 from emanuele45/master

Small imperfection with themes installation