CRM-14394. Check that $path is not NULL, and that the file exists.

merge on test pass - no need to re-update ticket