LPS-37352 make folders consistent with file entries
LPS-37352 don't allow for several ending characters
LPS-37352 SF