This function loads a material from a file.
Returns a material object if the file is loaded successfully, otherwise NULL is returned.