Set cache path after initializing other properties
fix a couple comments
Added retina_quality parameter
Fix an issue with PHP versions earlier than 5.3