FIX: split returns empty array when no pattern match.
FIX: does not include last component unless pattern in the end.
Added additional edge case.