Unlock read-only properties before setting them. Fixes exception when trying to create new custom-type files.
Fixed failing test. The problem here was that the second argument (result of find(...)) was null and contains(..) return an empty string instead of false.