Media Sources open_basedir restriction fix

I've updated the ajaxupload function to use a folder inside the core/cache directory - this resolves the folder restriction issue.

I also remove the temporary image after it's been used by the media source.

Logging has been tidied also.