Altered permissions for images produced by the ImageModel factory
Replaced "\n\r" with PHP_EOL
Wrong equality operator was being used for a business rule