fixing owncloud/core#6765: avoid world writable folder

when ownCloud is extracted as user root, world writable files and
folder need to be fixed

@PVince81 I think I got understood PR now...it's just that I have patched against stable6...can this also be merged into master?