Fix for Undelete directory action

Fix for https://github.com/owncloud/core/issues/1698 
Versions app should be enabled.
Steps to reproduce: 
1. Create a new directory
2. Put it to trash
3. Restore from trash bin

This pull request treats the cause of the disease, not the symptoms :)
//cc @schiesbn