Added pre-save validation for paths with a unique index so that they pass a validation error instead of failing with an E11000 error.