I have taken some time to track down and document the affected versions of PHP Sample Code where the "caching locally" feature was broken.
The PHP Sample Code v2.0.5 (released on 12/05/2013 and 05/22/2014) had this issue and would not save the images. An update was released on 04/21/2015 that addressed that bug.
In any case, there are newer versions of code, listed in the Documentation Area, available presently.
Fortunately, none of the integrations, plugins, or modules that we track used those broken versions of sample code. So this should not be a problem in existing integrations. However, recent improvements to the sample code, release v2.0.6 and above, will likely mean an update to integrations as we have time.