Issue CRM-14394. Check that $path is not NULL, and that the file exists.
Merge pull request #2753 from fuzionnz/CRM-14394

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