Undelete directory fix

Fix for https://github.com/owncloud/core/issues/1698

Btw,  files app had  exploding by semicolon too. It  was changed to array  by icewind when he struggled with numerous bug reports on rare uncommon filenames deletion (like .(dot)  test;test, etc).
But it's out of scope for this particular issue.