Utils: new safeFileName() function
Model: support before/after methods for insert and edit