owncloud: Code rearranges and stat call added to stat.
owncloud: Code rearranges and stat call added to stat.

Rearranged function sequence and added stat call to parent dir to
function open if file is written to. That allows a proper ENOENT
return value if directory is not yet existing. Fixed more escaping
glitches.

gco/csync,meeh420/csync,meeh420/csync,gco/csync,gco/csync,gco/csync,meeh420/csync