Use realpath to resolve symplinks

Fixes https://github.com/owncloud/core/issues/9709