use OC files API to create missing directory which should handle special chars in every environment correctly
also create root dir if it doesn't exist yet
added createMissingDirectories() method
added missing parameter documentation
switched to dirname()
Merge pull request #4427 from owncloud/fix_4425

use OC files API to create missing directory