image cacheFilename checks for numeric strings

using JSON_NUMERIC_CHECK json_encode flag and avoid duplicate files
creation.

Discussion here https://groups.google.com/forum/#!topic/silverstripe-dev/q0ga_LxGDvs