Add path encoding to public API.

Better attempt to fix https://github.com/owncloud/core/issues/3856

Supersedes https://github.com/owncloud/core/pull/3877

To reproduce:
- create a directory named a#@ in Web UI
- create two nested subdirectories under a#@: a#@/1 and a#@/1/2
- Delete a#@ 
- Go to 'Deleted files'
- Check if it is possible to browse into '2'

@schiesbn, @icewind1991