Prior to R2014b, generating image formats when running MATLAB with -nodisplay was achieved by first creating a temporary PostScript file and then using Ghostscript to convert that file to the desired format.
You appear to be running into a problem as that temporary PostScript file is created.
It's possible that one of these could help:
- cleaning out the temp directory, or
- setting a different temp directory before starting MATLAB, by setting the TEMP (on Windows) or TMP (other platforms) environment variable
An alternative approach would be to create EPS files rather than PNG, and then later convert those files to PNG using Ghostscript or some other system tool.