added missing $model to getFileExtension call

made extension() work again