Added a line of code to remove the first comma at the beginning of Array...

... definition:

var tinyMCEImageList = new Array(,["/public/images/subfolder1/image1.jpg ... 

That situation happens if you have no images in the root directory of images for TinyMCE