Changed client.stat to request metadata from API, instead of HEAD request.

I did not know about the api/file/handle/metadata endpoint, and did not
see it in their REST api documentation either.

This makes it possible to get information like width and height of an
image, which I really needed.