fixing .segment() to allow appending an empty element - closes #106
fixing .segment() to collapse empty elements within array