image cacheFilename checks for numeric strings

using JSON_NUMERIC_CHECK json_encode flag and avoid duplicate files
creation
Raised minimum PHP Veresion to 5.3.3
Merge pull request #2577 from colymba/fix-cacheFilename

image cacheFilename checks for numeric strings