Updated default to adjust oritentation

Default is now set to true
Added correct caching headers
Supressing errors for exif_read_data

Added the @ in front of exif_read_data call because it returns a fatal
error when trying to read corrupt or invalid EXIF data and there isn't
a way to validate the EXIF data before calling the function.
Fixed race condition

There was a race condition where it would sometimes delete and create
cache file, whilst another instance deletes the new cache file instead
of the old one, due to it using the same name. As a result the first
instance would try to fetch the newly created cache file, only to find
it's been deleted by the second instance and can't display the image.

Fixed by creating a lock on the index.html file within the cache
directory, and if lock is successfuly only then delete the expired
cache files, therefore this only happens once at a time no matter how
many instances are runing.