Fixes #3542: don't run chmod unless the directory exists
Merge pull request #48 from jooooooon/bug_3542_fix_chmod_on_ppkeys_dir

Fixes #3542: don't run chmod unless the directory exists