Fixed sharing results to include the correct permissions

Passing $includeCollections would return more than one entry which gives
mixed up file permissions.

Added a method getFile() that doesn't set $includeCollections to make
sure we only get one result which is the file itself.

Fixes #6265
Added unit test for sharing permissions
Merge pull request #6270 from owncloud/sharing-mixeduppermissionsfix

Fixed sharing results to include the correct permissions