Fixed material files not being copied from temp directory.