fix function signature to match interface & not give warning
Issue CRM-14394. Check that $path is not NULL, and that the file exists.