prevent creation of folders with invalid names