encodeURIComponent on dirname
Merge pull request #408 from owncloud/encode-amp

encodeURIComponent on dirname