add a safe_mode check
Merge pull request #1881 from owncloud/safemode_check

add a safe_mode check