always use '/' as dir seperator

selective backport of https://github.com/owncloud/core/pull/9181

cc @MorrisJobke @PVince81 

fixes #9032