wrap stat() call in a try/catch block

If stat() fails a warning gets written directly to the syslog containing sensible data like username and password.

This PR wraps the stat() call in a try/catch block and writes the warning to the owncloud.log which allows us to remove the password and username.

cc @icewind1991 please have a look?
cc @PVince81 maybe you can also give it a try...