Rotate thumbnail when encryption is enabled

When a picture is encrypted, save it to a temporary file first so that
the PHP function for rotation can access it as file.
Merge pull request #36 from owncloud/exif-rotate-with-encryption

Rotate thumbnail when encryption is enabled