guess mimetype on touch

Fixes https://github.com/owncloud/core/issues/11672 for amazon s3 and swift.

cc @PVince81 @ser72 

@karlitschek backport to stable7?